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

Unified Diff: chrome/browser/ui/views/profiles/signin_view_controller.h

Issue 1413533009: Make the new Gaia password separated signin flow modal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK Created 5 years 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/ui/views/profiles/signin_view_controller.h
diff --git a/chrome/browser/ui/views/profiles/signin_view_controller.h b/chrome/browser/ui/views/profiles/signin_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..668be1489e9e2141e059bb48dbfbc618742a1d76
--- /dev/null
+++ b/chrome/browser/ui/views/profiles/signin_view_controller.h
@@ -0,0 +1,58 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_SIGNIN_VIEW_CONTROLLER_H_
+#define CHROME_BROWSER_UI_VIEWS_PROFILES_SIGNIN_VIEW_CONTROLLER_H_
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "chrome/browser/ui/profile_chooser_constants.h"
+
+class Browser;
+class ModalSigninDelegate;
+class Profile;
+
+namespace content {
+class WebContentsDelegate;
+}
+
+namespace views {
+class WebView;
+}
+
+class SigninViewController {
+ public:
+ SigninViewController();
+ ~SigninViewController();
+
+ // Returns true if the signin flow should be shown as tab-modal for |mode|.
+ static bool ShouldShowModalSigninForMode(profiles::BubbleViewMode mode);
+
+ // Creates the web view that contains the signin flow in |mode| using
+ // |profile| as the web content's profile, then sets |delegate| as the created
+ // web content's delegate.
+ static views::WebView* CreateGaiaWebView(
+ content::WebContentsDelegate* delegate,
+ profiles::BubbleViewMode mode,
+ Profile* profile);
+
+ // Shows the signin flow as a tab modal dialog attached to |browser|'s active
+ // web contents.
+ void ShowModalSignin(profiles::BubbleViewMode mode, Browser* browser);
+
+ // Closes the tab-modal signin flow previously shown using this
+ // SigninViewController, if one exists. Does nothing otherwise.
+ void CloseModalSignin();
+
+ // Notifies this object that it's |modal_signin_delegate_| member has become
+ // invalid.
+ void ResetModalSigninDelegate();
+
+ private:
+ ModalSigninDelegate* modal_signin_delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(SigninViewController);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_PROFILES_SIGNIN_VIEW_CONTROLLER_H_
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | chrome/browser/ui/views/profiles/signin_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698