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

Side by Side Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 631163004: Mac - show user manager before opening browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use different app_controller_mac method. use different TaskMgr call. Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/value_conversions.h" 10 #include "base/value_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h" 14 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 16 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
17 #include "chrome/browser/profiles/profile_info_cache.h" 17 #include "chrome/browser/profiles/profile_info_cache.h"
18 #include "chrome/browser/profiles/profile_info_cache_observer.h" 18 #include "chrome/browser/profiles/profile_info_cache_observer.h"
19 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/browser/profiles/profile_metrics.h" 20 #include "chrome/browser/profiles/profile_metrics.h"
21 #include "chrome/browser/profiles/profile_window.h" 21 #include "chrome/browser/profiles/profile_window.h"
22 #include "chrome/browser/profiles/profiles_state.h" 22 #include "chrome/browser/profiles/profiles_state.h"
23 #include "chrome/browser/signin/local_auth.h" 23 #include "chrome/browser/signin/local_auth.h"
24 #include "chrome/browser/ui/browser_commands.h"
24 #include "chrome/browser/ui/browser_dialogs.h" 25 #include "chrome/browser/ui/browser_dialogs.h"
25 #include "chrome/browser/ui/browser_finder.h" 26 #include "chrome/browser/ui/browser_finder.h"
26 #include "chrome/browser/ui/browser_list.h" 27 #include "chrome/browser/ui/browser_list.h"
27 #include "chrome/browser/ui/chrome_pages.h" 28 #include "chrome/browser/ui/chrome_pages.h"
28 #include "chrome/browser/ui/singleton_tabs.h" 29 #include "chrome/browser/ui/singleton_tabs.h"
29 #include "chrome/browser/ui/user_manager.h" 30 #include "chrome/browser/ui/user_manager.h"
30 #include "chrome/common/pref_names.h" 31 #include "chrome/common/pref_names.h"
31 #include "chrome/common/url_constants.h" 32 #include "chrome/common/url_constants.h"
32 #include "chrome/grit/chromium_strings.h" 33 #include "chrome/grit/chromium_strings.h"
33 #include "chrome/grit/generated_resources.h" 34 #include "chrome/grit/generated_resources.h"
34 #include "content/public/browser/notification_service.h" 35 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/user_metrics.h"
Mark Mentovai 2014/10/08 16:43:22 No longer necessary.
Mike Lerman 2014/10/08 20:23:41 Indeed.
35 #include "content/public/browser/web_contents.h" 37 #include "content/public/browser/web_contents.h"
36 #include "content/public/browser/web_ui.h" 38 #include "content/public/browser/web_ui.h"
37 #include "google_apis/gaia/gaia_auth_fetcher.h" 39 #include "google_apis/gaia/gaia_auth_fetcher.h"
38 #include "google_apis/gaia/gaia_constants.h" 40 #include "google_apis/gaia/gaia_constants.h"
39 #include "third_party/skia/include/core/SkBitmap.h" 41 #include "third_party/skia/include/core/SkBitmap.h"
40 #include "ui/base/l10n/l10n_util.h" 42 #include "ui/base/l10n/l10n_util.h"
41 #include "ui/base/resource/resource_bundle.h" 43 #include "ui/base/resource/resource_bundle.h"
42 #include "ui/base/webui/web_ui_util.h" 44 #include "ui/base/webui/web_ui_util.h"
43 #include "ui/gfx/image/image.h" 45 #include "ui/gfx/image/image.h"
44 #include "ui/gfx/image/image_skia.h" 46 #include "ui/gfx/image/image_skia.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 IDS_LOGIN_ERROR_AUTHENTICATING)), 712 IDS_LOGIN_ERROR_AUTHENTICATING)),
711 base::StringValue(""), 713 base::StringValue(""),
712 base::FundamentalValue(0)); 714 base::FundamentalValue(0));
713 } 715 }
714 } 716 }
715 717
716 void UserManagerScreenHandler::OnBrowserWindowReady(Browser* browser) { 718 void UserManagerScreenHandler::OnBrowserWindowReady(Browser* browser) {
717 DCHECK(browser); 719 DCHECK(browser);
718 DCHECK(browser->window()); 720 DCHECK(browser->window());
719 if (url_hash_ == profiles::kUserManagerSelectProfileTaskManager) { 721 if (url_hash_ == profiles::kUserManagerSelectProfileTaskManager) {
720 base::MessageLoop::current()->PostTask( 722 base::MessageLoop::current()->PostTask(
721 FROM_HERE, base::Bind(&chrome::ShowTaskManager, browser)); 723 FROM_HERE, base::Bind(&chrome::OpenTaskManager, browser));
722 } else if (url_hash_ == profiles::kUserManagerSelectProfileAboutChrome) { 724 } else if (url_hash_ == profiles::kUserManagerSelectProfileAboutChrome) {
723 base::MessageLoop::current()->PostTask( 725 base::MessageLoop::current()->PostTask(
724 FROM_HERE, base::Bind(&chrome::ShowAboutChrome, browser)); 726 FROM_HERE, base::Bind(&chrome::ShowAboutChrome, browser));
727 } else if (url_hash_ == profiles::kUserManagerSelectProfileChromeSettings) {
728 base::MessageLoop::current()->PostTask(
729 FROM_HERE, base::Bind(&chrome::ShowSettings, browser));
725 } 730 }
726 731
727 // This call is last as it deletes this object. 732 // This call is last as it deletes this object.
728 UserManager::Hide(); 733 UserManager::Hide();
729 } 734 }
730 735
731 void UserManagerScreenHandler::Observe( 736 void UserManagerScreenHandler::Observe(
732 int type, 737 int type,
733 const content::NotificationSource& source, 738 const content::NotificationSource& source,
734 const content::NotificationDetails& details) { 739 const content::NotificationDetails& details) {
(...skipping 19 matching lines...) Expand all
754 Profile* profile, Profile::CreateStatus profile_create_status) { 759 Profile* profile, Profile::CreateStatus profile_create_status) {
755 Browser* browser = chrome::FindAnyBrowser(profile, false, desktop_type_); 760 Browser* browser = chrome::FindAnyBrowser(profile, false, desktop_type_);
756 if (browser && browser->window()) { 761 if (browser && browser->window()) {
757 OnBrowserWindowReady(browser); 762 OnBrowserWindowReady(browser);
758 } else { 763 } else {
759 registrar_.Add(this, 764 registrar_.Add(this,
760 chrome::NOTIFICATION_BROWSER_WINDOW_READY, 765 chrome::NOTIFICATION_BROWSER_WINDOW_READY,
761 content::NotificationService::AllSources()); 766 content::NotificationService::AllSources());
762 } 767 }
763 } 768 }
OLDNEW
« chrome/browser/app_controller_mac.mm ('K') | « chrome/browser/ui/views/profiles/user_manager_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698