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

Side by Side Diff: chrome/browser/ui/webui/signin/login_ui_service.h

Issue 10699013: Add a method to LoginUIService to open the sign in UI in a popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/profiles/profile_keyed_service.h" 10 #include "chrome/browser/profiles/profile_keyed_service.h"
(...skipping 21 matching lines...) Expand all
32 LoginUIService(); 32 LoginUIService();
33 virtual ~LoginUIService(); 33 virtual ~LoginUIService();
34 34
35 // Gets the currently active login UI, or null if no login UI is active. 35 // Gets the currently active login UI, or null if no login UI is active.
36 LoginUI* current_login_ui() const { 36 LoginUI* current_login_ui() const {
37 return ui_; 37 return ui_;
38 } 38 }
39 39
40 // Sets the currently active login UI. It is illegal to call this if there is 40 // Sets the currently active login UI. It is illegal to call this if there is
41 // already login UI visible. 41 // already login UI visible.
42 // Fires chrome::NOTIFICATION_LOGIN_UI_CHANGED.
42 void SetLoginUI(LoginUI* ui); 43 void SetLoginUI(LoginUI* ui);
43 44
44 // Called when login UI is closed. If the passed UI is the current login UI, 45 // Called when login UI is closed. If the passed UI is the current login UI,
45 // sets current_login_ui() to null. 46 // sets current_login_ui() to null.
47 // Fires chrome::NOTIFICATION_LOGIN_UI_CHANGED.
46 void LoginUIClosed(LoginUI* ui); 48 void LoginUIClosed(LoginUI* ui);
47 49
48 // Brings the login UI to the foreground, or if there is no login UI, 50 // Brings the login UI to the foreground, or if there is no login UI,
49 // navigates to the login UI page in the given browser. 51 // navigates to the login UI page in the given browser.
50 // Virtual for mocking purposes. 52 // Virtual for mocking purposes.
51 virtual void ShowLoginUI(Browser* browser); 53 virtual void ShowLoginUI(Browser* browser);
52 54
55 // Same as ShowLoginUI but opens a popup with the login UI instead of a
56 // new tab.
57 // Note that if an existing login UI is already open, this method will focus
58 // that UI even though it is not a popup.
59 virtual void ShowLoginDialogUI(Browser* browser);
60
53 private: 61 private:
62 void FireLoginUIChanged() const;
63
54 // Weak pointer to the currently active login UI, or null if none. 64 // Weak pointer to the currently active login UI, or null if none.
55 LoginUI* ui_; 65 LoginUI* ui_;
56 66
57 DISALLOW_COPY_AND_ASSIGN(LoginUIService); 67 DISALLOW_COPY_AND_ASSIGN(LoginUIService);
58 }; 68 };
59 69
60 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ 70 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/login_ui_service.cc » ('j') | chrome/browser/ui/webui/signin/login_ui_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698