OLD | NEW |
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" |
(...skipping 26 matching lines...) Expand all Loading... |
37 static bool IsShowing(); | 37 static bool IsShowing(); |
38 | 38 |
39 // Called by the cocoa window controller when its window closes and the | 39 // Called by the cocoa window controller when its window closes and the |
40 // controller destroyed itself. Deletes the instance. | 40 // controller destroyed itself. Deletes the instance. |
41 void WindowWasClosed(); | 41 void WindowWasClosed(); |
42 | 42 |
43 private: | 43 private: |
44 explicit UserManagerMac(Profile* profile); | 44 explicit UserManagerMac(Profile* profile); |
45 virtual ~UserManagerMac(); | 45 virtual ~UserManagerMac(); |
46 | 46 |
47 // Creates a new UserManagerMac instance for the |guest_profile| and | 47 // Creates a new UserManagerMac instance for |profile| and shows the |url|. |
48 // shows the |url|. | 48 static void OnUserManagerProfileCreated(Profile* profile, |
49 static void OnGuestProfileCreated(Profile* guest_profile, | 49 const std::string& url); |
50 const std::string& url); | |
51 | 50 |
52 // An open User Manager window. There can only be one open at a time. This | 51 // 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. | 52 // is reset to NULL when the window is closed. |
54 static UserManagerMac* instance_; // Weak. | 53 static UserManagerMac* instance_; // Weak. |
55 | 54 |
56 // Controller of the window. | 55 // Controller of the window. |
57 base::scoped_nsobject<UserManagerWindowController> window_controller_; | 56 base::scoped_nsobject<UserManagerWindowController> window_controller_; |
58 | 57 |
59 DISALLOW_COPY_AND_ASSIGN(UserManagerMac); | 58 DISALLOW_COPY_AND_ASSIGN(UserManagerMac); |
60 }; | 59 }; |
61 | 60 |
62 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_ | 61 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_ |
OLD | NEW |