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

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.h

Issue 564453003: Access to Chrome via the System Tray should go through the User Manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor ShowUserManager into a new static class Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_window.h" 10 #include "chrome/browser/profiles/profile_window.h"
11 #include "ui/views/window/dialog_delegate.h" 11 #include "ui/views/window/dialog_delegate.h"
12 12
13 class AutoKeepAlive; 13 class AutoKeepAlive;
14 14
15 namespace views { 15 namespace views {
16 class WebView; 16 class WebView;
17 } 17 }
18 18
19 // Dialog widget that contains the Desktop User Manager webui. 19 // Dialog widget that contains the Desktop User Manager webui.
20 class UserManagerView : public views::DialogDelegateView { 20 class UserManagerView : public views::DialogDelegateView {
21 public: 21 public:
22 // Shows the User Manager or re-activates an existing one, focusing the 22 // Shows the User Manager or re-activates an existing one, focusing the
23 // profile given by |profile_path_to_focus|. Based on the value of 23 // profile given by |profile_path_to_focus|. Based on the value of
24 // |tutorial_mode|, a tutorial could be shown, in which case 24 // |tutorial_mode|, a tutorial could be shown, in which case
25 // |profile_path_to_focus| is ignored. 25 // |profile_path_to_focus| is ignored. After a profile is opened, execute the
26 // |profile_open_action|.
26 static void Show(const base::FilePath& profile_path_to_focus, 27 static void Show(const base::FilePath& profile_path_to_focus,
Peter Kasting 2014/09/15 20:17:28 Nit: I'd eliminate these three public statics and
Mike Lerman 2014/09/17 18:31:46 In the interest of keeping private things private
Peter Kasting 2014/09/17 20:14:13 I don't know if I understand your plan. Perhaps y
Mike Lerman 2014/09/18 18:32:45 Couldn't find a great approach. I eliminated these
27 profiles::UserManagerTutorialMode tutorial_mode); 28 profiles::UserManagerTutorialMode tutorial_mode,
29 profiles::UserManagerProfileSelected profile_open_action);
28 30
29 // Hide the User Manager. 31 // Hide the User Manager.
30 static void Hide(); 32 static void Hide();
31 33
32 // Returns whether or not the User Manager is showing. 34 // Returns whether or not the User Manager is showing.
33 static bool IsShowing(); 35 static bool IsShowing();
34 36
35 private: 37 private:
36 friend struct base::DefaultDeleter<UserManagerView>; 38 friend struct base::DefaultDeleter<UserManagerView>;
37 39
(...skipping 28 matching lines...) Expand all
66 68
67 scoped_ptr<AutoKeepAlive> keep_alive_; 69 scoped_ptr<AutoKeepAlive> keep_alive_;
68 // An open User Manager window. There can only be one open at a time. This 70 // An open User Manager window. There can only be one open at a time. This
69 // is reset to NULL when the window is closed. 71 // is reset to NULL when the window is closed.
70 static UserManagerView* instance_; 72 static UserManagerView* instance_;
71 73
72 DISALLOW_COPY_AND_ASSIGN(UserManagerView); 74 DISALLOW_COPY_AND_ASSIGN(UserManagerView);
73 }; 75 };
74 76
75 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_ 77 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_USER_MANAGER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698