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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.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: string16->string. Simplify OnbrowserWindowReady. 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_COCOA_PROFILES_USER_MANAGER_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_window.h" 13 #include "chrome/browser/profiles/profile_window.h"
14 14
15 @class UserManagerWindowController; 15 @class UserManagerWindowController;
16 16
17 namespace content { 17 namespace content {
18 class NavigationController; 18 class NavigationController;
19 class WebContents; 19 class WebContents;
20 } 20 }
21 21
22 // Dialog widget that contains the Desktop User Manager webui. 22 // Dialog widget that contains the Desktop User Manager webui.
23 class UserManagerMac { 23 class UserManagerMac {
24 public: 24 public:
25 // Shows the User Manager or re-activates an existing one, focusing the 25 // Shows the User Manager or re-activates an existing one, focusing the
26 // profile given by |profile_path_to_focus|. Based on the value of 26 // profile given by |profile_path_to_focus|. Based on the value of
27 // |tutorial_mode|, a tutorial could be shown, in which case 27 // |tutorial_mode|, a tutorial could be shown, in which case
28 // |profile_path_to_focus| is ignored. 28 // |profile_path_to_focus| is ignored. After a profile is opened, execute the
29 // |profile_open_action|.
29 static void Show(const base::FilePath& profile_path_to_focus, 30 static void Show(const base::FilePath& profile_path_to_focus,
30 profiles::UserManagerTutorialMode tutorial_mode); 31 profiles::UserManagerTutorialMode tutorial_mode,
32 profiles::UserManagerProfileSelected profile_open_action);
31 33
32 // Hide the User Manager. 34 // Hide the User Manager.
33 static void Hide(); 35 static void Hide();
34 36
35 // Returns whether or not the User Manager is showing. 37 // Returns whether or not the User Manager is showing.
36 static bool IsShowing(); 38 static bool IsShowing();
37 39
38 // Called by the cocoa window controller when its window closes and the 40 // Called by the cocoa window controller when its window closes and the
39 // controller destroyed itself. Deletes the instance. 41 // controller destroyed itself. Deletes the instance.
40 void WindowWasClosed(); 42 void WindowWasClosed();
(...skipping 11 matching lines...) Expand all
52 // is reset to NULL when the window is closed. 54 // is reset to NULL when the window is closed.
53 static UserManagerMac* instance_; // Weak. 55 static UserManagerMac* instance_; // Weak.
54 56
55 // Controller of the window. 57 // Controller of the window.
56 base::scoped_nsobject<UserManagerWindowController> window_controller_; 58 base::scoped_nsobject<UserManagerWindowController> window_controller_;
57 59
58 DISALLOW_COPY_AND_ASSIGN(UserManagerMac); 60 DISALLOW_COPY_AND_ASSIGN(UserManagerMac);
59 }; 61 };
60 62
61 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_ 63 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698