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

Side by Side Diff: chrome/browser/ui/cocoa/user_manager_mac.h

Issue 102913002: [Mac] User manager should show up as a standalone window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 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_COCOA_USER_MANAGER_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_USER_MANAGER_MAC_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/profiles/profile.h"
13
14 class UserManagerMac;
15 @class UserManagerWindowController;
16
17 namespace content {
18 class NavigationController;
19 class WebContents;
20 }
21
22 // Dialog widget that contains the Desktop User Manager webui.
23 class UserManagerMac {
24 public:
25 // Shows the User Manager or re-activates an existing one, focusing the
26 // profile given by |profile_path_to_focus|.
27 static void Show(const base::FilePath& profile_path_to_focus);
28
29 // Hide the User Manager.
30 static void Hide();
31
32 // Returns whether or not the User Manager is showing.
33 static bool IsShowing();
34
35 // Called by the cocoa window controller when its window closes and the
36 // controller destroyed itself. Deletes the instance.
37 void WindowWasClosed();
38
39 private:
40 explicit UserManagerMac(Profile* profile);
41 virtual ~UserManagerMac();
42
43 // If the |guest_profile| has been initialized succesfully (according to
44 // |status|), creates a new UserManagerMac instance with the user with path
45 // |profile_path_to_focus| focused.
46 static void OnGuestProfileCreated(const base::FilePath& profile_path_to_focus,
47 Profile* guest_profile,
48 Profile::CreateStatus status);
49
50 // An open User Manager window. There can only be one open at a time. This
51 // is reset to NULL when the window is closed.
52 static UserManagerMac* instance_; // Weak.
53
54 // Controller of the window.
55 base::scoped_nsobject<UserManagerWindowController> window_controller_;
56
57 DISALLOW_COPY_AND_ASSIGN(UserManagerMac);
58 };
59
60 #endif // CHROME_BROWSER_UI_COCOA_USER_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/task_manager_mac.mm ('k') | chrome/browser/ui/cocoa/user_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698