| // Copyright 2025 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module new_tab_page.mojom; |
| |
| // Enum for use in NewTabPage.MicrosoftAuth.AuthStarted histogram. |
| // Must match the NTPMicrosoftAuthType enum. |
| enum AuthType { |
| kSilent, |
| kPopup, |
| }; |
| |
| // Interfaces for inter-frame communication between chrome:// and its embedded |
| // chrome-untrusted:// child document. |
| |
| enum AuthState { |
| kNone, // No valid access token but no error. |
| kError, |
| kSuccess, |
| }; |
| |
| // Implemented in JavaScript by the ntp-microsoft-auth document, represents the |
| // embedded chrome-untrusted:// document. |
| interface MicrosoftAuthUntrustedDocument { |
| // Tells the Microsoft Auth child document to acquire a token via popup. |
| AcquireTokenPopup(); |
| // Tells the Microsoft Auth child document to acquire a token silently. |
| AcquireTokenSilent(); |
| // Tell the Microsoft Auth child page to sign out. |
| SignOut(); |
| }; |