| 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 <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 namespace extensions { | 70 namespace extensions { |
| 71 | 71 |
| 72 bool ChromeVirtualKeyboardDelegate::GetKeyboardConfig( | 72 bool ChromeVirtualKeyboardDelegate::GetKeyboardConfig( |
| 73 base::DictionaryValue* results) { | 73 base::DictionaryValue* results) { |
| 74 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 74 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 75 results->SetString("layout", keyboard::GetKeyboardLayout()); | 75 results->SetString("layout", keyboard::GetKeyboardLayout()); |
| 76 // TODO(bshe): Consolidate a11y, hotrod and normal mode into a mode enum. See | 76 // TODO(bshe): Consolidate a11y, hotrod and normal mode into a mode enum. See |
| 77 // crbug.com/529474. | 77 // crbug.com/529474. |
| 78 results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); | 78 results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); |
| 79 results->SetBoolean("hotrodmode", keyboard::GetHotrodKeyboardEnabled()); | 79 results->SetBoolean("hotrodmode", keyboard::GetHotrodKeyboardEnabled()); |
| 80 scoped_ptr<base::ListValue> features(new base::ListValue()); | 80 std::unique_ptr<base::ListValue> features(new base::ListValue()); |
| 81 features->AppendString(GenerateFeatureFlag( | 81 features->AppendString(GenerateFeatureFlag( |
| 82 "floatingvirtualkeyboard", keyboard::IsFloatingVirtualKeyboardEnabled())); | 82 "floatingvirtualkeyboard", keyboard::IsFloatingVirtualKeyboardEnabled())); |
| 83 features->AppendString( | 83 features->AppendString( |
| 84 GenerateFeatureFlag("gesturetyping", keyboard::IsGestureTypingEnabled())); | 84 GenerateFeatureFlag("gesturetyping", keyboard::IsGestureTypingEnabled())); |
| 85 features->AppendString(GenerateFeatureFlag( | 85 features->AppendString(GenerateFeatureFlag( |
| 86 "gestureediting", keyboard::IsGestureEditingEnabled())); | 86 "gestureediting", keyboard::IsGestureEditingEnabled())); |
| 87 features->AppendString( | 87 features->AppendString( |
| 88 GenerateFeatureFlag("voiceinput", keyboard::IsVoiceInputEnabled())); | 88 GenerateFeatureFlag("voiceinput", keyboard::IsVoiceInputEnabled())); |
| 89 features->AppendString(GenerateFeatureFlag("experimental", | 89 features->AppendString(GenerateFeatureFlag("experimental", |
| 90 keyboard::IsExperimentalInputViewEnabled())); | 90 keyboard::IsExperimentalInputViewEnabled())); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 196 } |
| 197 | 197 |
| 198 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { | 198 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { |
| 199 return (user_manager::UserManager::Get()->IsUserLoggedIn() && | 199 return (user_manager::UserManager::Get()->IsUserLoggedIn() && |
| 200 !chromeos::UserAddingScreen::Get()->IsRunning() && | 200 !chromeos::UserAddingScreen::Get()->IsRunning() && |
| 201 !(chromeos::ScreenLocker::default_screen_locker() && | 201 !(chromeos::ScreenLocker::default_screen_locker() && |
| 202 chromeos::ScreenLocker::default_screen_locker()->locked())); | 202 chromeos::ScreenLocker::default_screen_locker()->locked())); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace extensions | 205 } // namespace extensions |
| OLD | NEW |