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

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

Issue 229163004: [Mac] Move profile related UI from cocoa/browser to cocoa/profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops forgot a comment Created 6 years, 8 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 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 #include "chrome/browser/profiles/profile_window.h"
14
15 class UserManagerMac;
16 @class UserManagerWindowController;
17
18 namespace content {
19 class NavigationController;
20 class WebContents;
21 }
22
23 // Dialog widget that contains the Desktop User Manager webui.
24 class UserManagerMac {
25 public:
26 // Shows the User Manager or re-activates an existing one, focusing the
27 // profile given by |profile_path_to_focus|. Based on the value of
28 // |tutorial_mode|, a tutorial could be shown, in which case
29 // |profile_path_to_focus| is ignored.
30 static void Show(const base::FilePath& profile_path_to_focus,
31 profiles::UserManagerTutorialMode tutorial_mode);
32
33 // Hide the User Manager.
34 static void Hide();
35
36 // Returns whether or not the User Manager is showing.
37 static bool IsShowing();
38
39 // Called by the cocoa window controller when its window closes and the
40 // controller destroyed itself. Deletes the instance.
41 void WindowWasClosed();
42
43 private:
44 explicit UserManagerMac(Profile* profile);
45 virtual ~UserManagerMac();
46
47 // Creates a new UserManagerMac instance for the |guest_profile| and
48 // shows the |url|.
49 static void OnGuestProfileCreated(Profile* guest_profile,
50 const std::string& url);
51
52 // An open User Manager window. There can only be one open at a time. This
53 // is reset to NULL when the window is closed.
54 static UserManagerMac* instance_; // Weak.
55
56 // Controller of the window.
57 base::scoped_nsobject<UserManagerWindowController> window_controller_;
58
59 DISALLOW_COPY_AND_ASSIGN(UserManagerMac);
60 };
61
62 #endif // CHROME_BROWSER_UI_COCOA_USER_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.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