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

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: rachel comments 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
16 namespace content {
17 class NavigationController;
18 class WebContents;
19 }
20
21 // Window controller for the User Manager view.
22 @interface UserManagerWindowController : NSWindowController <NSWindowDelegate> {
23 @private
Nico 2013/12/12 18:05:40 nit: I think we indent @private by 1
noms (inactive) 2013/12/12 22:59:23 Done.
24 scoped_ptr<content::WebContents> webContents_;
25 UserManagerMac* userManagerObserver_; // Weak.
26 }
27
28 - (id)initWithProfile:(Profile*) profile
Nico 2013/12/12 18:05:40 nit: no space between *) and p
noms (inactive) 2013/12/12 22:59:23 Gah. Done. On 2013/12/12 18:05:40, Nico wrote:
29 withObserver:(UserManagerMac*) userManagerObserver;
Nico 2013/12/12 18:05:40 (same here)
noms (inactive) 2013/12/12 22:59:23 Done.
30 - (void)showURL:(const GURL&)url;
31 - (void)show;
32 - (void)close;
33 @end
Nico 2013/12/12 18:05:40 nit: It looks like this class is only used in the
noms (inactive) 2013/12/12 22:59:23 Done.
34
35 // Dialog widget that contains the Desktop User Manager webui.
36 class UserManagerMac {
37 public:
38 // Shows the User Manager or re-activates an existing one, focusing the
39 // profile given by |profile_path_to_focus|.
40 static void Show(const base::FilePath& profile_path_to_focus);
41
42 // Hide the User Manager.
43 static void Hide();
44
45 // Returns whether or not the User Manager is showing.
46 static bool IsShowing();
47
48 // Called by the cocoa window controller when its window closes and the
49 // controller destroyed itself. Deletes the instance.
50 void WindowWasClosed();
51
52 private:
53 explicit UserManagerMac(Profile* profile);
54 virtual ~UserManagerMac();
55
56 // If the |guest_profile| has been initialized succesfully (according to
57 // |status|), creates a new UserManagerMac instance with the user with path
58 // |profile_path_to_focus| focused.
59 static void OnGuestProfileCreated(const base::FilePath& profile_path_to_focus,
60 Profile* guest_profile,
61 Profile::CreateStatus status);
62
63 // An open User Manager window. There can only be one open at a time. This
64 // is reset to NULL when the window is closed.
65 static UserManagerMac* instance_; // Weak.
66
67 // Controller of the window.
68 base::scoped_nsobject<UserManagerWindowController> window_controller_;
69
70 DISALLOW_COPY_AND_ASSIGN(UserManagerMac);
71 };
72
73 #endif // CHROME_BROWSER_UI_COCOA_USER_MANAGER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698