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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 2279163002: cros: Bind password echo with TouchView mode
Patch Set: do not run for mash to fix mash test Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #include "chrome/browser/chromeos/power/power_data_collector.h" 71 #include "chrome/browser/chromeos/power/power_data_collector.h"
72 #include "chrome/browser/chromeos/power/power_prefs.h" 72 #include "chrome/browser/chromeos/power/power_prefs.h"
73 #include "chrome/browser/chromeos/power/renderer_freezer.h" 73 #include "chrome/browser/chromeos/power/renderer_freezer.h"
74 #include "chrome/browser/chromeos/profiles/profile_helper.h" 74 #include "chrome/browser/chromeos/profiles/profile_helper.h"
75 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" 75 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h"
76 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " 76 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h "
77 #include "chrome/browser/chromeos/settings/device_settings_service.h" 77 #include "chrome/browser/chromeos/settings/device_settings_service.h"
78 #include "chrome/browser/chromeos/status/data_promo_notification.h" 78 #include "chrome/browser/chromeos/status/data_promo_notification.h"
79 #include "chrome/browser/chromeos/system/input_device_settings.h" 79 #include "chrome/browser/chromeos/system/input_device_settings.h"
80 #include "chrome/browser/chromeos/ui/low_disk_notification.h" 80 #include "chrome/browser/chromeos/ui/low_disk_notification.h"
81 #include "chrome/browser/chromeos/ui/password_echo_controller.h"
81 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" 82 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h"
82 #include "chrome/browser/defaults.h" 83 #include "chrome/browser/defaults.h"
83 #include "chrome/browser/lifetime/application_lifetime.h" 84 #include "chrome/browser/lifetime/application_lifetime.h"
84 #include "chrome/browser/net/chrome_network_delegate.h" 85 #include "chrome/browser/net/chrome_network_delegate.h"
85 #include "chrome/browser/profiles/profile.h" 86 #include "chrome/browser/profiles/profile.h"
86 #include "chrome/browser/profiles/profile_manager.h" 87 #include "chrome/browser/profiles/profile_manager.h"
87 #include "chrome/browser/ui/ash/ash_util.h" 88 #include "chrome/browser/ui/ash/ash_util.h"
88 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" 89 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h"
89 #include "chrome/common/channel_info.h" 90 #include "chrome/common/channel_info.h"
90 #include "chrome/common/chrome_constants.h" 91 #include "chrome/common/chrome_constants.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 647
647 // Initialize input methods. 648 // Initialize input methods.
648 input_method::InputMethodManager* manager = 649 input_method::InputMethodManager* manager =
649 input_method::InputMethodManager::Get(); 650 input_method::InputMethodManager::Get();
650 UserSessionManager* session_manager = UserSessionManager::GetInstance(); 651 UserSessionManager* session_manager = UserSessionManager::GetInstance();
651 DCHECK(manager); 652 DCHECK(manager);
652 DCHECK(session_manager); 653 DCHECK(session_manager);
653 654
654 manager->SetState(session_manager->GetDefaultIMEState(profile())); 655 manager->SetState(session_manager->GetDefaultIMEState(profile()));
655 656
657 if (!chrome::IsRunningInMash()) {
658 // Creates PasswordEchoController before SessionManager starts so that
659 // the login screen is covered as well.
660 // TODO(xiyuan): Revisit for mash.
661 password_echo_controller_.reset(new PasswordEchoController);
662 }
663
656 bool is_running_test = parameters().ui_task != nullptr; 664 bool is_running_test = parameters().ui_task != nullptr;
657 g_browser_process->platform_part()->InitializeSessionManager( 665 g_browser_process->platform_part()->InitializeSessionManager(
658 parsed_command_line(), profile(), is_running_test); 666 parsed_command_line(), profile(), is_running_test);
659 g_browser_process->platform_part()->SessionManager()->Start(); 667 g_browser_process->platform_part()->SessionManager()->Start();
660 668
661 // Guest user profile is never initialized with locale settings, 669 // Guest user profile is never initialized with locale settings,
662 // so we need special handling for Guest session. 670 // so we need special handling for Guest session.
663 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) 671 if (user_manager::UserManager::Get()->IsLoggedInAsGuest())
664 SetGuestLocale(profile()); 672 SetGuestLocale(profile());
665 673
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 843
836 // Make sure that there is no pending URLRequests. 844 // Make sure that there is no pending URLRequests.
837 UserSessionManager::GetInstance()->Shutdown(); 845 UserSessionManager::GetInstance()->Shutdown();
838 846
839 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers 847 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers
840 // on services that are going to be deleted later but before its Shutdown() 848 // on services that are going to be deleted later but before its Shutdown()
841 // is called. 849 // is called.
842 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> 850 g_browser_process->platform_part()->browser_policy_connector_chromeos()->
843 PreShutdown(); 851 PreShutdown();
844 852
853 // Resets PasswordEchoController before ash shuts down.
854 password_echo_controller_.reset();
855
845 // We first call PostMainMessageLoopRun and then destroy UserManager, because 856 // We first call PostMainMessageLoopRun and then destroy UserManager, because
846 // Ash needs to be closed before UserManager is destroyed. 857 // Ash needs to be closed before UserManager is destroyed.
847 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 858 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
848 859
849 if (!chrome::IsRunningInMash()) 860 if (!chrome::IsRunningInMash())
850 AccessibilityManager::Shutdown(); 861 AccessibilityManager::Shutdown();
851 862
852 input_method::Shutdown(); 863 input_method::Shutdown();
853 864
854 // Stops all in-flight OAuth2 token fetchers before the IO thread stops. 865 // Stops all in-flight OAuth2 token fetchers before the IO thread stops.
(...skipping 19 matching lines...) Expand all
874 // Destroy DBus services immediately after threads are stopped. 885 // Destroy DBus services immediately after threads are stopped.
875 dbus_services_.reset(); 886 dbus_services_.reset();
876 887
877 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 888 ChromeBrowserMainPartsLinux::PostDestroyThreads();
878 889
879 // Destroy DeviceSettingsService after g_browser_process. 890 // Destroy DeviceSettingsService after g_browser_process.
880 DeviceSettingsService::Shutdown(); 891 DeviceSettingsService::Shutdown();
881 } 892 }
882 893
883 } // namespace chromeos 894 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.h ('k') | chrome/browser/chromeos/ui/password_echo_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698