OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/metrics/user_metrics_action.h" | 9 #include "base/metrics/user_metrics_action.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace extensions { | 33 namespace extensions { |
34 | 34 |
35 bool ChromeVirtualKeyboardDelegate::GetKeyboardConfig( | 35 bool ChromeVirtualKeyboardDelegate::GetKeyboardConfig( |
36 base::DictionaryValue* results) { | 36 base::DictionaryValue* results) { |
37 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 37 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
38 results->SetString("layout", keyboard::GetKeyboardLayout()); | 38 results->SetString("layout", keyboard::GetKeyboardLayout()); |
39 results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); | 39 results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); |
40 results->SetBoolean("experimental", | 40 results->SetBoolean("experimental", |
41 keyboard::IsExperimentalInputViewEnabled()); | 41 keyboard::IsExperimentalInputViewEnabled()); |
| 42 results->SetBoolean("gesturetyping", keyboard::IsGestureTypingEnabled()); |
42 return true; | 43 return true; |
43 } | 44 } |
44 | 45 |
45 bool ChromeVirtualKeyboardDelegate::HideKeyboard() { | 46 bool ChromeVirtualKeyboardDelegate::HideKeyboard() { |
46 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 47 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
47 keyboard::KeyboardController* controller = | 48 keyboard::KeyboardController* controller = |
48 keyboard::KeyboardController::GetInstance(); | 49 keyboard::KeyboardController::GetInstance(); |
49 if (!controller) | 50 if (!controller) |
50 return false; | 51 return false; |
51 | 52 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 119 } |
119 | 120 |
120 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { | 121 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { |
121 return (user_manager::UserManager::Get()->IsUserLoggedIn() && | 122 return (user_manager::UserManager::Get()->IsUserLoggedIn() && |
122 !chromeos::UserAddingScreen::Get()->IsRunning() && | 123 !chromeos::UserAddingScreen::Get()->IsRunning() && |
123 !(chromeos::ScreenLocker::default_screen_locker() && | 124 !(chromeos::ScreenLocker::default_screen_locker() && |
124 chromeos::ScreenLocker::default_screen_locker()->locked())); | 125 chromeos::ScreenLocker::default_screen_locker()->locked())); |
125 } | 126 } |
126 | 127 |
127 } // namespace extensions | 128 } // namespace extensions |
OLD | NEW |