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

Unified Diff: chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc

Issue 34783006: Add --keyboard-usability-test flag and always show keyboard unless manually hide (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviews Created 7 years, 2 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/ui/ash/ash_keyboard_controller_proxy.cc
diff --git a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
index 9c986f6ae936a23f1b7a35ef9a633d7b55c88ea1..b3ecaebf0ee53756c0ca8266cc0cf3795b86be9f 100644
--- a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
+++ b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
@@ -148,9 +148,13 @@ void AshKeyboardControllerProxy::ShowKeyboardContainer(
NOTIMPLEMENTED();
KeyboardControllerProxy::ShowKeyboardContainer(container);
- gfx::Rect showing_area =
- ash::DisplayController::GetPrimaryDisplay().work_area();
- GetInputMethod()->GetTextInputClient()->EnsureCaretInRect(showing_area);
+ // GetTextInputClient may return NULL when keyboard-usability-test flag is
+ // set.
+ if (GetInputMethod()->GetTextInputClient()) {
+ gfx::Rect showing_area =
+ ash::DisplayController::GetPrimaryDisplay().work_area();
+ GetInputMethod()->GetTextInputClient()->EnsureCaretInRect(showing_area);
+ }
}
void AshKeyboardControllerProxy::SetUpdateInputType(ui::TextInputType type) {

Powered by Google App Engine
This is Rietveld 408576698