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

Side by Side Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 9809016: Disable extension IMEs when the screen is locked (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/login/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (input_method_id == hardware_keyboard_id) { 154 if (input_method_id == hardware_keyboard_id) {
155 should_add_hardware_keyboard = false; 155 should_add_hardware_keyboard = false;
156 } 156 }
157 } 157 }
158 if (should_add_hardware_keyboard) { 158 if (should_add_hardware_keyboard) {
159 value.string_list_value.push_back(hardware_keyboard_id); 159 value.string_list_value.push_back(hardware_keyboard_id);
160 } 160 }
161 // We don't want to shut down the IME, even if the hardware layout is the 161 // We don't want to shut down the IME, even if the hardware layout is the
162 // only IME left. 162 // only IME left.
163 manager->SetEnableAutoImeShutdown(false); 163 manager->SetEnableAutoImeShutdown(false);
164 manager->SetEnableExtensionIMEs(false);
164 manager->SetInputMethodConfig( 165 manager->SetInputMethodConfig(
165 chromeos::language_prefs::kGeneralSectionName, 166 chromeos::language_prefs::kGeneralSectionName,
166 chromeos::language_prefs::kPreloadEnginesConfigName, 167 chromeos::language_prefs::kPreloadEnginesConfigName,
167 value); 168 value);
168 } 169 }
169 } 170 }
170 171
171 void RestoreInputMethods() { 172 void RestoreInputMethods() {
172 if (!saved_active_input_method_list_.empty()) { 173 if (!saved_active_input_method_list_.empty()) {
173 chromeos::input_method::InputMethodManager* manager = 174 chromeos::input_method::InputMethodManager* manager =
174 chromeos::input_method::InputMethodManager::GetInstance(); 175 chromeos::input_method::InputMethodManager::GetInstance();
175 176
176 chromeos::input_method::InputMethodConfigValue value; 177 chromeos::input_method::InputMethodConfigValue value;
177 value.type = 178 value.type =
178 chromeos::input_method::InputMethodConfigValue::kValueTypeStringList; 179 chromeos::input_method::InputMethodConfigValue::kValueTypeStringList;
179 value.string_list_value = saved_active_input_method_list_; 180 value.string_list_value = saved_active_input_method_list_;
180 manager->SetEnableAutoImeShutdown(true); 181 manager->SetEnableAutoImeShutdown(true);
182 manager->SetEnableExtensionIMEs(true);
181 manager->SetInputMethodConfig( 183 manager->SetInputMethodConfig(
182 chromeos::language_prefs::kGeneralSectionName, 184 chromeos::language_prefs::kGeneralSectionName,
183 chromeos::language_prefs::kPreloadEnginesConfigName, 185 chromeos::language_prefs::kPreloadEnginesConfigName,
184 value); 186 value);
185 // Send previous input method id first so Ctrl+space would work fine. 187 // Send previous input method id first so Ctrl+space would work fine.
186 if (!saved_previous_input_method_id_.empty()) 188 if (!saved_previous_input_method_id_.empty())
187 manager->ChangeInputMethod(saved_previous_input_method_id_); 189 manager->ChangeInputMethod(saved_previous_input_method_id_);
188 if (!saved_current_input_method_id_.empty()) 190 if (!saved_current_input_method_id_.empty())
189 manager->ChangeInputMethod(saved_current_input_method_id_); 191 manager->ChangeInputMethod(saved_current_input_method_id_);
190 192
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 bool state = true; 454 bool state = true;
453 content::NotificationService::current()->Notify( 455 content::NotificationService::current()->Notify(
454 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 456 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
455 content::Source<ScreenLocker>(this), 457 content::Source<ScreenLocker>(this),
456 content::Details<bool>(&state)); 458 content::Details<bool>(&state));
457 DBusThreadManager::Get()->GetPowerManagerClient()-> 459 DBusThreadManager::Get()->GetPowerManagerClient()->
458 NotifyScreenLockCompleted(); 460 NotifyScreenLockCompleted();
459 } 461 }
460 462
461 } // namespace chromeos 463 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698