| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/keyboard/keyboard_util.h" | 5 #include "ui/keyboard/keyboard_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 return keyboard_switch == switches::kGestureTypingEnabled; | 170 return keyboard_switch == switches::kGestureTypingEnabled; |
| 171 } | 171 } |
| 172 | 172 |
| 173 bool IsGestureEditingEnabled() { | 173 bool IsGestureEditingEnabled() { |
| 174 std::string keyboard_switch = | 174 std::string keyboard_switch = |
| 175 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 175 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 176 switches::kGestureEditing); | 176 switches::kGestureEditing); |
| 177 return keyboard_switch == switches::kGestureEditingEnabled; | 177 return keyboard_switch == switches::kGestureEditingEnabled; |
| 178 } | 178 } |
| 179 | 179 |
| 180 bool IsSmartDeployEnabled() { |
| 181 std::string keyboard_switch = |
| 182 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 183 switches::kSmartVirtualKeyboard); |
| 184 return keyboard_switch != switches::kSmartVirtualKeyboardDisabled; |
| 185 } |
| 186 |
| 180 bool IsMaterialDesignEnabled() { | 187 bool IsMaterialDesignEnabled() { |
| 181 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 188 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 182 switches::kDisableNewMDInputView); | 189 switches::kDisableNewMDInputView); |
| 183 } | 190 } |
| 184 | 191 |
| 185 bool IsVoiceInputEnabled() { | 192 bool IsVoiceInputEnabled() { |
| 186 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 193 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 187 switches::kDisableVoiceInput); | 194 switches::kDisableVoiceInput); |
| 188 } | 195 } |
| 189 | 196 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 449 } |
| 443 | 450 |
| 444 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 451 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
| 445 UMA_HISTOGRAM_ENUMERATION( | 452 UMA_HISTOGRAM_ENUMERATION( |
| 446 "VirtualKeyboard.KeyboardControlEvent", | 453 "VirtualKeyboard.KeyboardControlEvent", |
| 447 event, | 454 event, |
| 448 keyboard::KEYBOARD_CONTROL_MAX); | 455 keyboard::KEYBOARD_CONTROL_MAX); |
| 449 } | 456 } |
| 450 | 457 |
| 451 } // namespace keyboard | 458 } // namespace keyboard |
| OLD | NEW |