| Index: ui/keyboard/keyboard_controller.cc
|
| diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
|
| index 313bc04f0cd77a1df96babfe2e17b852f3f513d2..08427a0e898ec554d4bcda6584f1a4f3096a8f94 100644
|
| --- a/ui/keyboard/keyboard_controller.cc
|
| +++ b/ui/keyboard/keyboard_controller.cc
|
| @@ -5,6 +5,7 @@
|
| #include "ui/keyboard/keyboard_controller.h"
|
|
|
| #include "base/bind.h"
|
| +#include "base/command_line.h"
|
| #include "ui/aura/layout_manager.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_delegate.h"
|
| @@ -18,6 +19,7 @@
|
| #include "ui/gfx/skia_util.h"
|
| #include "ui/keyboard/keyboard_controller_observer.h"
|
| #include "ui/keyboard/keyboard_controller_proxy.h"
|
| +#include "ui/keyboard/keyboard_switches.h"
|
| #include "ui/keyboard/keyboard_util.h"
|
|
|
| namespace {
|
| @@ -125,6 +127,7 @@ KeyboardController::KeyboardController(KeyboardControllerProxy* proxy)
|
| : proxy_(proxy),
|
| input_method_(NULL),
|
| keyboard_visible_(false),
|
| + command_line_for_testing_(NULL),
|
| weak_factory_(this) {
|
| CHECK(proxy);
|
| input_method_ = proxy_->GetInputMethod();
|
| @@ -188,7 +191,10 @@ void KeyboardController::OnTextInputStateChanged(
|
| bool should_show = was_showing;
|
| ui::TextInputType type =
|
| client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
|
| - if (type == ui::TEXT_INPUT_TYPE_NONE) {
|
| + CommandLine* command_line = command_line_for_testing_ ?
|
| + command_line_for_testing_ : CommandLine::ForCurrentProcess();
|
| + if (type == ui::TEXT_INPUT_TYPE_NONE &&
|
| + !command_line->HasSwitch(switches::kKeyboardUsabilityTest)) {
|
| should_show = false;
|
| } else {
|
| if (container_->children().empty()) {
|
|
|