| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // Dialog widget that contains the Desktop User Manager webui. This object | 22 // Dialog widget that contains the Desktop User Manager webui. This object |
| 23 // should always be created from the UserManager::Show() method. Note that only | 23 // should always be created from the UserManager::Show() method. Note that only |
| 24 // one User Manager will exist at a time. | 24 // one User Manager will exist at a time. |
| 25 class UserManagerMac { | 25 class UserManagerMac { |
| 26 public: | 26 public: |
| 27 // Called by the cocoa window controller when its window closes and the | 27 // Called by the cocoa window controller when its window closes and the |
| 28 // controller destroyed itself. Deletes the instance. | 28 // controller destroyed itself. Deletes the instance. |
| 29 void WindowWasClosed(); | 29 void WindowWasClosed(); |
| 30 | 30 |
| 31 // Called from the UserManager class once the |guest_profile| is ready. Will | 31 // Called from the UserManager class once the |system_profile| is ready. Will |
| 32 // construct a UserManagerMac object and show |url|. | 32 // construct a UserManagerMac object and show |url|. |
| 33 static void OnGuestProfileCreated(Profile* guest_profile, | 33 static void OnSystemProfileCreated(Profile* system_profile, |
| 34 const std::string& url); | 34 const std::string& url); |
| 35 | 35 |
| 36 UserManagerWindowController* window_controller() { | 36 UserManagerWindowController* window_controller() { |
| 37 return window_controller_.get(); | 37 return window_controller_.get(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 explicit UserManagerMac(Profile* profile); | 41 explicit UserManagerMac(Profile* profile); |
| 42 virtual ~UserManagerMac(); | 42 virtual ~UserManagerMac(); |
| 43 | 43 |
| 44 // Controller of the window. | 44 // Controller of the window. |
| 45 base::scoped_nsobject<UserManagerWindowController> window_controller_; | 45 base::scoped_nsobject<UserManagerWindowController> window_controller_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(UserManagerMac); | 47 DISALLOW_COPY_AND_ASSIGN(UserManagerMac); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_ | 50 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_USER_MANAGER_MAC_H_ |
| OLD | NEW |