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

Side by Side Diff: chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc

Issue 1371113002: Reset to us qwerty VK if called chrome.virtualKeyboardPrivate.setHotrodKeyboard(false) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_ keyboard_delegate.h" 5 #include "chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_ keyboard_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void ChromeVirtualKeyboardDelegate::SetHotrodKeyboard(bool enable) { 123 void ChromeVirtualKeyboardDelegate::SetHotrodKeyboard(bool enable) {
124 if (keyboard::GetHotrodKeyboardEnabled() == enable) 124 if (keyboard::GetHotrodKeyboardEnabled() == enable)
125 return; 125 return;
126 126
127 keyboard::SetHotrodKeyboardEnabled(enable); 127 keyboard::SetHotrodKeyboardEnabled(enable);
128 // This reloads virtual keyboard even if it exists. This ensures virtual 128 // This reloads virtual keyboard even if it exists. This ensures virtual
129 // keyboard gets the correct state of the hotrod keyboard through 129 // keyboard gets the correct state of the hotrod keyboard through
130 // chrome.virtualKeyboardPrivate.getKeyboardConfig. 130 // chrome.virtualKeyboardPrivate.getKeyboardConfig.
131 if (enable && keyboard::IsKeyboardEnabled()) 131 if (keyboard::IsKeyboardEnabled())
132 ash::Shell::GetInstance()->CreateKeyboard(); 132 ash::Shell::GetInstance()->CreateKeyboard();
133 } 133 }
134 134
135 bool ChromeVirtualKeyboardDelegate::LockKeyboard(bool state) { 135 bool ChromeVirtualKeyboardDelegate::LockKeyboard(bool state) {
136 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 136 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
137 keyboard::KeyboardController* controller = 137 keyboard::KeyboardController* controller =
138 keyboard::KeyboardController::GetInstance(); 138 keyboard::KeyboardController::GetInstance();
139 if (!controller) 139 if (!controller)
140 return false; 140 return false;
141 141
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { 197 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() {
198 return (user_manager::UserManager::Get()->IsUserLoggedIn() && 198 return (user_manager::UserManager::Get()->IsUserLoggedIn() &&
199 !chromeos::UserAddingScreen::Get()->IsRunning() && 199 !chromeos::UserAddingScreen::Get()->IsRunning() &&
200 !(chromeos::ScreenLocker::default_screen_locker() && 200 !(chromeos::ScreenLocker::default_screen_locker() &&
201 chromeos::ScreenLocker::default_screen_locker()->locked())); 201 chromeos::ScreenLocker::default_screen_locker()->locked()));
202 } 202 }
203 203
204 } // namespace extensions 204 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698