Chromium Code Reviews| Index: chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc |
| diff --git a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc |
| index 3b758870627d57a375d1b940e14188be4e39a545..913e38a521a23393b7c3ae5450cb88383a1bc80c 100644 |
| --- a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc |
| +++ b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc |
| @@ -73,6 +73,7 @@ bool ChromeVirtualKeyboardDelegate::GetKeyboardConfig( |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| results->SetString("layout", keyboard::GetKeyboardLayout()); |
| results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); |
| + results->SetBoolean("hotrodmode", keyboard::GetHotrodKeyboardEnabled()); |
| scoped_ptr<base::ListValue> features(new base::ListValue()); |
| features->AppendString(GenerateFeatureFlag( |
| "floatingvirtualkeyboard", keyboard::IsFloatingVirtualKeyboardEnabled())); |
| @@ -117,6 +118,18 @@ bool ChromeVirtualKeyboardDelegate::OnKeyboardLoaded() { |
| return true; |
| } |
| +void ChromeVirtualKeyboardDelegate::SetHotrodKeyboard(bool enable) { |
| + if (keyboard::GetHotrodKeyboardEnabled() == enable) |
| + return; |
| + |
| + keyboard::SetHotrodKeyboardEnabled(enable); |
| + // This reloads virtual keyboard even if it exists. This ensures virtual |
| + // keyboard gets the correct state of the hotrod keyboard through |
| + // chrome.virtualKeyboardPrivate.getKeyboardConfig. |
| + if (enable && keyboard::IsKeyboardEnabled()) |
|
rsadam
2015/09/08 21:48:22
Does this actually reload the keyboard? Looking th
|
| + ash::Shell::GetInstance()->CreateKeyboard(); |
| +} |
| + |
| bool ChromeVirtualKeyboardDelegate::LockKeyboard(bool state) { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| keyboard::KeyboardController* controller = |