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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/input_method_manager.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc
index 031b9711824dd4cc756cd76d07d1c3a63b543f70..77ade8700138cfc4e765656bf3ec83905048f0a5 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -79,6 +79,7 @@ class InputMethodManagerImpl : public InputMethodManager,
should_launch_ime_(false),
ime_connected_(false),
enable_auto_ime_shutdown_(false), // workaround for crosbug.com/27051.
+ enable_extension_imes_(true),
shutting_down_(false),
ibus_daemon_process_handle_(base::kNullProcessHandle),
util_(whitelist_.GetSupportedInputMethods()),
@@ -306,10 +307,12 @@ class InputMethodManagerImpl : public InputMethodManager,
value.type == InputMethodConfigValue::kValueTypeStringList) {
active_input_method_ids_ = value.string_list_value;
- std::map<std::string, InputMethodDescriptor>::const_iterator ix;
- for (ix = extra_input_method_ids_.begin();
- ix != extra_input_method_ids_.end(); ++ix) {
- active_input_method_ids_.push_back(ix->first);
+ if (enable_extension_imes_) {
+ std::map<std::string, InputMethodDescriptor>::const_iterator ix;
+ for (ix = extra_input_method_ids_.begin();
+ ix != extra_input_method_ids_.end(); ++ix) {
+ active_input_method_ids_.push_back(ix->first);
+ }
}
}
@@ -1190,6 +1193,10 @@ class InputMethodManagerImpl : public InputMethodManager,
// enable_auto_ime_shutdown_ = enable;
}
+ void SetEnableExtensionIMEs(bool enable) {
+ enable_extension_imes_ = enable;
+ }
+
// content::NotificationObserver implementation:
void Observe(int type,
const content::NotificationSource& source,
@@ -1250,6 +1257,8 @@ class InputMethodManagerImpl : public InputMethodManager,
// True if we should stop input method daemon when there are no input
// methods other than one for the hardware keyboard.
bool enable_auto_ime_shutdown_;
+ // True if extension IMEs can be enabled.
+ bool enable_extension_imes_;
// The ID of the tentative current input method (ex. "mozc"). This value
// can be different from the actual current input method, if
// ChangeInputMethod() fails.
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager.h ('k') | chrome/browser/chromeos/login/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698