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

Unified Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.h

Issue 564453003: Access to Chrome via the System Tray should go through the User Manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase continued Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/profiles/user_manager_mac.h
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.h b/chrome/browser/ui/cocoa/profiles/user_manager_mac.h
index e71006271f43fc891082233ea50589b5dccc426d..6a1080aae5e7e3cb9c3ea1c63300c11b1d73b39e 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.h
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.h
@@ -19,38 +19,27 @@ class NavigationController;
class WebContents;
}
-// Dialog widget that contains the Desktop User Manager webui.
+// Dialog widget that contains the Desktop User Manager webui. This object
+// should always be created from the UserManager::Show() method. Note that only
+// one User Manager will exist at a time.
class UserManagerMac {
public:
- // Shows the User Manager or re-activates an existing one, focusing the
- // profile given by |profile_path_to_focus|. Based on the value of
- // |tutorial_mode|, a tutorial could be shown, in which case
- // |profile_path_to_focus| is ignored.
- static void Show(const base::FilePath& profile_path_to_focus,
- profiles::UserManagerTutorialMode tutorial_mode);
-
- // Hide the User Manager.
- static void Hide();
-
- // Returns whether or not the User Manager is showing.
- static bool IsShowing();
-
// Called by the cocoa window controller when its window closes and the
// controller destroyed itself. Deletes the instance.
void WindowWasClosed();
- private:
- explicit UserManagerMac(Profile* profile);
- virtual ~UserManagerMac();
-
- // Creates a new UserManagerMac instance for the |guest_profile| and
- // shows the |url|.
+ // Called from the UserManager class once the |guest_profile| is ready. Will
+ // construct a UserManagerMac object and show |url|.
static void OnGuestProfileCreated(Profile* guest_profile,
const std::string& url);
- // An open User Manager window. There can only be one open at a time. This
- // is reset to NULL when the window is closed.
- static UserManagerMac* instance_; // Weak.
+ UserManagerWindowController* window_controller() {
+ return window_controller_.get();
+ }
+
+ private:
+ explicit UserManagerMac(Profile* profile);
+ virtual ~UserManagerMac();
// Controller of the window.
base::scoped_nsobject<UserManagerWindowController> window_controller_;
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | chrome/browser/ui/cocoa/profiles/user_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698