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

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

Issue 2806613002: Check IME state in ImeController (Closed)
Patch Set: Add comments Created 3 years, 8 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "chrome/browser/chromeos/profiles/profile_helper.h" 83 #include "chrome/browser/chromeos/profiles/profile_helper.h"
84 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" 84 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h"
85 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " 85 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h "
86 #include "chrome/browser/chromeos/settings/device_settings_service.h" 86 #include "chrome/browser/chromeos/settings/device_settings_service.h"
87 #include "chrome/browser/chromeos/settings/shutdown_policy_forwarder.h" 87 #include "chrome/browser/chromeos/settings/shutdown_policy_forwarder.h"
88 #include "chrome/browser/chromeos/status/data_promo_notification.h" 88 #include "chrome/browser/chromeos/status/data_promo_notification.h"
89 #include "chrome/browser/chromeos/system/input_device_settings.h" 89 #include "chrome/browser/chromeos/system/input_device_settings.h"
90 #include "chrome/browser/chromeos/ui/low_disk_notification.h" 90 #include "chrome/browser/chromeos/ui/low_disk_notification.h"
91 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" 91 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h"
92 #include "chrome/browser/defaults.h" 92 #include "chrome/browser/defaults.h"
93 #include "chrome/browser/extensions/extension_error_reporter.h"
93 #include "chrome/browser/lifetime/application_lifetime.h" 94 #include "chrome/browser/lifetime/application_lifetime.h"
94 #include "chrome/browser/net/chrome_network_delegate.h" 95 #include "chrome/browser/net/chrome_network_delegate.h"
95 #include "chrome/browser/profiles/profile.h" 96 #include "chrome/browser/profiles/profile.h"
96 #include "chrome/browser/profiles/profile_manager.h" 97 #include "chrome/browser/profiles/profile_manager.h"
97 #include "chrome/browser/task_manager/task_manager_interface.h" 98 #include "chrome/browser/task_manager/task_manager_interface.h"
98 #include "chrome/browser/ui/ash/ash_util.h" 99 #include "chrome/browser/ui/ash/ash_util.h"
99 #include "chrome/common/channel_info.h" 100 #include "chrome/common/channel_info.h"
100 #include "chrome/common/chrome_constants.h" 101 #include "chrome/common/chrome_constants.h"
101 #include "chrome/common/chrome_paths.h" 102 #include "chrome/common/chrome_paths.h"
102 #include "chrome/common/chrome_switches.h" 103 #include "chrome/common/chrome_switches.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 742
742 // Initialize input methods. 743 // Initialize input methods.
743 input_method::InputMethodManager* manager = 744 input_method::InputMethodManager* manager =
744 input_method::InputMethodManager::Get(); 745 input_method::InputMethodManager::Get();
745 UserSessionManager* session_manager = UserSessionManager::GetInstance(); 746 UserSessionManager* session_manager = UserSessionManager::GetInstance();
746 DCHECK(manager); 747 DCHECK(manager);
747 DCHECK(session_manager); 748 DCHECK(session_manager);
748 749
749 manager->SetState(session_manager->GetDefaultIMEState(profile())); 750 manager->SetState(session_manager->GetDefaultIMEState(profile()));
750 751
752 // Show postponed extension error messages (if any) if it is the active user
753 // profile. Because extension errors are always reported in context of active
754 // user, it's safe to display the message boxes after input methods of the
755 // active user is initialized.
756 if (ProfileHelper::Get()->GetUserByProfile(profile())->is_active())
xiyuan 2017/04/24 18:21:51 Most of the time (i.e. NOT the crash-n-restart cas
Wenzhao (Colin) Zang 2017/04/25 22:06:32 Done.
757 ExtensionErrorReporter::GetInstance()->ShowPostponedMessages();
758
751 bool is_running_test = parameters().ui_task != nullptr; 759 bool is_running_test = parameters().ui_task != nullptr;
752 g_browser_process->platform_part()->session_manager()->Initialize( 760 g_browser_process->platform_part()->session_manager()->Initialize(
753 parsed_command_line(), profile(), is_running_test); 761 parsed_command_line(), profile(), is_running_test);
754 762
755 // Guest user profile is never initialized with locale settings, 763 // Guest user profile is never initialized with locale settings,
756 // so we need special handling for Guest session. 764 // so we need special handling for Guest session.
757 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) 765 if (user_manager::UserManager::Get()->IsLoggedInAsGuest())
758 SetGuestLocale(profile()); 766 SetGuestLocale(profile());
759 767
760 // This observer uses the intialized profile to dispatch extension events. 768 // This observer uses the intialized profile to dispatch extension events.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 999
992 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 1000 ChromeBrowserMainPartsLinux::PostDestroyThreads();
993 1001
994 // Destroy DeviceSettingsService after g_browser_process. 1002 // Destroy DeviceSettingsService after g_browser_process.
995 DeviceSettingsService::Shutdown(); 1003 DeviceSettingsService::Shutdown();
996 1004
997 chromeos::ShutdownCloseTracking(); 1005 chromeos::ShutdownCloseTracking();
998 } 1006 }
999 1007
1000 } // namespace chromeos 1008 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698