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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager.cc

Issue 9852008: Update IME preferences outside the IME status button when Uber Tray is in use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry 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
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager.h ('k') | chrome/browser/chromeos/preferences.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 77ade8700138cfc4e765656bf3ec83905048f0a5..9887c49ae77e791796bfbff2c6e3e962cc66a7ed 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -17,6 +17,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/input_method/browser_state_monitor.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/input_method/input_method_whitelist.h"
#include "chrome/browser/chromeos/input_method/virtual_keyboard_selector.h"
@@ -84,6 +85,8 @@ class InputMethodManagerImpl : public InputMethodManager,
ibus_daemon_process_handle_(base::kNullProcessHandle),
util_(whitelist_.GetSupportedInputMethods()),
xkeyboard_(XKeyboard::Create(util_)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ browser_state_monitor_(new BrowserStateMonitor(this))),
ignore_hotkeys_(false) {
// Observe APP_TERMINATING to stop input method daemon gracefully.
// We should not use APP_EXITING here since logout might be canceled by
@@ -1211,6 +1214,9 @@ class InputMethodManagerImpl : public InputMethodManager,
candidate_window_controller_->RemoveObserver(this);
candidate_window_controller_.reset(NULL);
#endif
+ // |browser_state_monitor_| has to be destructed while the PrefService
+ // object associated with the monitor is alive. (crbug.com/120183)
+ browser_state_monitor_.reset();
}
}
@@ -1298,6 +1304,10 @@ class InputMethodManagerImpl : public InputMethodManager,
// auto-repeat interval.
scoped_ptr<XKeyboard> xkeyboard_;
+ // An object which monitors a notification from the browser to keep track of
+ // the browser state (not logged in, logged in, etc.).
+ scoped_ptr<BrowserStateMonitor> browser_state_monitor_;
+
// true when DisableHotkeys() is called to temporarily disable IME hotkeys.
// EnableHotkeys() resets the flag to the default value, false.
bool ignore_hotkeys_;
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager.h ('k') | chrome/browser/chromeos/preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698