Index: ash/shell/keyboard_controller_proxy_stub.cc |
diff --git a/ash/shell/keyboard_controller_proxy_stub.cc b/ash/shell/keyboard_controller_proxy_stub.cc |
index 220d69e63869e83648371202686c81e770d65290..d708d04c6adc5590f80d48d8ef0438129bf30c9d 100644 |
--- a/ash/shell/keyboard_controller_proxy_stub.cc |
+++ b/ash/shell/keyboard_controller_proxy_stub.cc |
@@ -6,9 +6,10 @@ |
#include "ash/shell.h" |
#include "ash/shell_delegate.h" |
+#include "ash/wm/window_util.h" |
#include "ui/aura/window.h" |
+#include "ui/aura/window_tree_host.h" |
#include "ui/base/ime/mock_input_method.h" |
-#include "ui/wm/core/input_method_event_filter.h" |
using namespace content; |
@@ -36,7 +37,12 @@ aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() { |
} |
ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() { |
- return Shell::GetInstance()->input_method_filter()->input_method(); |
+ aura::Window* root_window = wm::GetActiveWindow(); |
+ if (root_window) |
+ root_window = root_window->GetRootWindow(); |
+ if (!root_window) |
+ root_window = Shell::GetTargetRootWindow(); |
James Cook
2015/06/03 16:34:27
same nit, GetPrimaryRootWindow()?
Shu Chen
2015/06/04 01:59:44
Done.
|
+ return root_window->GetHost()->GetInputMethod(); |
} |
void KeyboardControllerProxyStub::RequestAudioInput( |