Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| index 834bb1e9c63b4a72bf17aeae2f70317a3a6ab22b..ac663850dd692be897929307796da34e5b1e01cb 100644 |
| --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| @@ -12,6 +12,7 @@ |
| #include <sstream> |
| #include <utility> |
| +#include "ash/shell.h" |
| #include "base/bind.h" |
| #include "base/hash.h" |
| #include "base/location.h" |
| @@ -1213,5 +1214,37 @@ void InputMethodManagerImpl::MaybeNotifyImeMenuActivationChanged() { |
| is_ime_menu_activated_); |
| } |
| +void InputMethodManagerImpl::ShowInputViewWithUrl( |
|
Shu Chen
2016/09/11 08:33:25
Is there any reason why this interface/implement i
Azure Wei
2016/09/12 13:12:57
If 'on-screen keyboard' hasn't been enabled, we ne
|
| + const std::string& appended_url) { |
| + GURL current_url = keyboard::GetOverrideContentUrl(); |
| + GURL input_view_url = |
| + GetActiveIMEState()->GetCurrentInputMethod().input_view_url(); |
| + if (current_url != input_view_url) |
| + return; |
| + GURL overriden_url = GURL(current_url.spec() + appended_url); |
| + keyboard::SetOverrideContentUrl(overriden_url); |
| + |
| + keyboard::KeyboardController* keyboard_controller = |
| + keyboard::KeyboardController::GetInstance(); |
| + if (keyboard_controller) { |
| + keyboard_controller->ShowKeyboard(false); |
| + return; |
| + } |
| + |
| + if (keyboard::IsKeyboardEnabled()) |
| + return; |
| + |
| + // Forcibly enables the a11y onscreen keyboard if there is on keyboard enabled |
| + // for now. And re-disables it after showing once. |
| + keyboard::SetAccessibilityKeyboardEnabled(true); |
| + ash::Shell::GetInstance()->CreateKeyboard(); |
| + keyboard_controller = keyboard::KeyboardController::GetInstance(); |
| + if (!keyboard_controller) { |
| + keyboard::SetAccessibilityKeyboardEnabled(false); |
| + } |
| + keyboard_controller->ShowKeyboard(false); |
| + keyboard::SetAccessibilityKeyboardEnabled(false); |
| +} |
| + |
| } // namespace input_method |
| } // namespace chromeos |