blob: 5be54bc8c409a233c86473c622520c766e170a94 [file] [log] [blame]
// 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();
};