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

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

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: Refactor ShowUserManager into a new static class 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.mm
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 957d95ba57bb6b8b04cab3e077f8fa47836a668c..c1497bbb7c4ee80e471a5d15f2d82459beac8c0e 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -23,23 +23,22 @@
const int kWindowWidth = 900;
const int kWindowHeight = 700;
-namespace chrome {
-
-// Declared in browser_dialogs.h so others don't have to depend on this header.
-void ShowUserManager(const base::FilePath& profile_path_to_focus) {
- UserManagerMac::Show(
- profile_path_to_focus, profiles::USER_MANAGER_NO_TUTORIAL);
-}
-
-void ShowUserManagerWithTutorial(profiles::UserManagerTutorialMode tutorial) {
- UserManagerMac::Show(base::FilePath(), tutorial);
+void UserManager::Show(
+ const base::FilePath& profile_path_to_focus,
+ profiles::UserManagerTutorialMode tutorial_mode,
+ profiles::UserManagerProfileSelected profile_open_action) {
+ UserManagerMac::Show(profile_path_to_focus,
+ tutorial_mode,
+ profile_open_action);
}
-void HideUserManager() {
+void UserManager::Hide() {
UserManagerMac::Hide();
}
-} // namespace chrome
+bool UserManager::IsShowing() {
+ return UserManagerMac::IsShowing();
+}
// Custom WebContentsDelegate that allows handling of hotkeys.
class UserManagerWebContentsDelegate : public content::WebContentsDelegate {
@@ -175,8 +174,10 @@ UserManagerMac::~UserManagerMac() {
}
// static
-void UserManagerMac::Show(const base::FilePath& profile_path_to_focus,
- profiles::UserManagerTutorialMode tutorial_mode) {
+void UserManagerMac::Show(
+ const base::FilePath& profile_path_to_focus,
+ profiles::UserManagerTutorialMode tutorial_mode,
+ profiles::UserManagerProfileSelected profile_open_action) {
if (instance_) {
// If there's a user manager window open already, just activate it.
[instance_->window_controller_ show];
@@ -188,6 +189,7 @@ void UserManagerMac::Show(const base::FilePath& profile_path_to_focus,
profiles::CreateGuestProfileForUserManager(
profile_path_to_focus,
tutorial_mode,
+ profile_open_action,
base::Bind(&UserManagerMac::OnGuestProfileCreated));
}

Powered by Google App Engine
This is Rietveld 408576698