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

Unified Diff: ui/base/ime/input_method_chromeos.cc

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed bot failure: cast_shell_linux Created 5 years, 6 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: ui/base/ime/input_method_chromeos.cc
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc
index e6491e3cc139f869a1944cdafca60ed6ac415d3b..b5d1f3a741789083f632b2d3cf08936765e5b850 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -50,7 +50,8 @@ InputMethodChromeOS::~InputMethodChromeOS() {
// We are dead, so we need to ask the client to stop relying on us.
OnInputMethodChanged();
- chromeos::IMEBridge::Get()->SetInputContextHandler(NULL);
+ if (chromeos::IMEBridge::Get())
+ chromeos::IMEBridge::Get()->SetInputContextHandler(NULL);
}
void InputMethodChromeOS::OnFocus() {
@@ -92,7 +93,7 @@ void InputMethodChromeOS::ProcessKeyEventDone(const ui::KeyEvent* event,
}
bool InputMethodChromeOS::DispatchKeyEvent(const ui::KeyEvent& event) {
- DCHECK(event.type() == ET_KEY_PRESSED || event.type() == ET_KEY_RELEASED);
+ DCHECK(event.IsKeyEvent());
DCHECK(system_toplevel_window_focused());
// For linux_chromeos, the ime keyboard cannot track the caps lock state by

Powered by Google App Engine
This is Rietveld 408576698