Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4640)

Unified Diff: chrome/browser/extensions/api/identity/experimental_web_auth_flow.h

Issue 14081014: Identity API: Change WebAuthFlow to use <webview> instead of a normal browser pop-up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chrome.identity side-by-side with chrome.experimental.identity Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/identity/experimental_web_auth_flow.h
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.h b/chrome/browser/extensions/api/identity/experimental_web_auth_flow.h
similarity index 75%
copy from chrome/browser/extensions/api/identity/web_auth_flow.h
copy to chrome/browser/extensions/api/identity/experimental_web_auth_flow.h
index dd5eed8dfac79af15b929de1a9f3e1fb65bc4ae8..96558a8d2dd3176a38216dbb1b39e159bb843db6 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.h
+++ b/chrome/browser/extensions/api/identity/experimental_web_auth_flow.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_
-#define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_
+#ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_EXPERIMENTAL_WEB_AUTH_FLOW_H_
+#define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_EXPERIMENTAL_WEB_AUTH_FLOW_H_
#include "chrome/browser/ui/host_desktop.h"
#include "content/public/browser/notification_observer.h"
@@ -13,7 +13,7 @@
#include "ui/gfx/rect.h"
class Profile;
-class WebAuthFlowTest;
+class ExperimentalWebAuthFlowTest;
namespace content {
class NotificationDetails;
@@ -24,20 +24,21 @@ class WebContents;
namespace extensions {
-// Controller class for web based auth flows. The WebAuthFlow starts
-// by navigating a WebContents to a URL specificed by the caller. Any
-// time the WebContents navigates to a new URL, the flow's delegate is
-// notified. The delegate is expected to delete the flow when
-// navigation reaches a known target URL.
+// Controller class for web based auth flows. The
+// ExperimentalWebAuthFlow starts by navigating a WebContents to a URL
+// specificed by the caller. Any time the WebContents navigates to a
+// new URL, the flow's delegate is notified. The delegate is expected
+// to delete the flow when navigation reaches a known target URL.
//
// The WebContents is not displayed until the first page load
// completes. This allows the flow to complete without flashing a
// window on screen if the provider immediately redirects to the
// target URL.
//
-// A WebAuthFlow can be started in Mode::SILENT, which never displays
-// a window. If a window would be required, the flow fails.
-class WebAuthFlow : public content::NotificationObserver,
+// A ExperimentalWebAuthFlow can be started in Mode::SILENT, which
+// never displays a window. If a window would be required, the flow
+// fails.
+class ExperimentalWebAuthFlow : public content::NotificationObserver,
public content::WebContentsObserver {
public:
enum Mode {
@@ -65,13 +66,13 @@ class WebAuthFlow : public content::NotificationObserver,
// Creates an instance with the given parameters.
// Caller owns |delegate|.
- WebAuthFlow(Delegate* delegate,
+ ExperimentalWebAuthFlow(Delegate* delegate,
Profile* profile,
const GURL& provider_url,
Mode mode,
const gfx::Rect& initial_bounds,
chrome::HostDesktopType host_desktop_type);
- virtual ~WebAuthFlow();
+ virtual ~ExperimentalWebAuthFlow();
// Starts the flow.
virtual void Start();
@@ -82,7 +83,7 @@ class WebAuthFlow : public content::NotificationObserver,
virtual void ShowAuthFlowPopup();
private:
- friend class ::WebAuthFlowTest;
+ friend class ::ExperimentalWebAuthFlowTest;
// NotificationObserver implementation.
virtual void Observe(int type,
@@ -112,9 +113,9 @@ class WebAuthFlow : public content::NotificationObserver,
content::WebContents* contents_;
content::NotificationRegistrar registrar_;
- DISALLOW_COPY_AND_ASSIGN(WebAuthFlow);
+ DISALLOW_COPY_AND_ASSIGN(ExperimentalWebAuthFlow);
};
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_WEB_AUTH_FLOW_H_
+#endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_EXPERIMENTAL_WEB_AUTH_FLOW_H_

Powered by Google App Engine
This is Rietveld 408576698