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

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

Issue 9295044: Start moving signin code out of browser/sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 8 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
7 #pragma once
8
9 #include "chrome/browser/profiles/profile_keyed_service.h"
10
11 class Profile;
12
13 namespace content {
14 class WebUI;
15 };
16
17 // The LoginUIService helps track per-profile information for the login UI -
18 // for example, whether there is login UI currently on-screen.
19 class LoginUIService : public ProfileKeyedService {
20 public:
21 explicit LoginUIService(Profile* profile);
James Hawkins 2012/02/10 23:08:01 Document |profile|.
Andrew T Wilson (Slow) 2012/02/11 01:50:45 Done.
22 virtual ~LoginUIService();
23
24 // Gets the currently active login UI, or null if no login UI is active.
25 content::WebUI* current_login_ui() const {
26 return ui_;
27 }
28
29 // Sets the currently active login UI. It is illegal to call this if there is
30 // already login UI visible.
31 void SetLoginUI(content::WebUI* ui);
32
33 // If the passed UI is the current login UI, clears it (called when login UI
34 // is being shut down).
35 void ClearLoginUI(content::WebUI* ui);
James Hawkins 2012/02/10 23:08:01 s/Clear/Reset/ may be clearer given that we're ref
Andrew T Wilson (Slow) 2012/02/11 01:50:45 Done.
36
37 // Brings the current login UI for this profile to the foreground (it is an
38 // error to call this if there is no visible login UI.
39 void FocusLoginUI();
40
41 // Displays the login dialog to the user.
42 void ShowLoginUI();
43
44 private:
45 // The currently active login UI, or null if none.
46 content::WebUI* ui_;
James Hawkins 2012/02/10 23:08:01 Document ownership (likely weak ptr).
Andrew T Wilson (Slow) 2012/02/11 01:50:45 Done.
47
48 // The profile this service is associated with.
49 Profile* profile_;
50 };
51
52
53 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698