| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 bool IsFloatingVirtualKeyboardEnabled() { | 178 bool IsFloatingVirtualKeyboardEnabled() { |
| 179 std::string floating_virtual_keyboard_switch = | 179 std::string floating_virtual_keyboard_switch = |
| 180 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 180 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 181 switches::kFloatingVirtualKeyboard); | 181 switches::kFloatingVirtualKeyboard); |
| 182 return floating_virtual_keyboard_switch == | 182 return floating_virtual_keyboard_switch == |
| 183 switches::kFloatingVirtualKeyboardEnabled; | 183 switches::kFloatingVirtualKeyboardEnabled; |
| 184 } | 184 } |
| 185 | 185 |
| 186 bool IsGestureTypingEnabled() { | 186 bool IsGestureTypingEnabled() { |
| 187 std::string keyboard_switch = | 187 return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 188 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 188 switches::kGestureTyping) != switches::kGestureTypingDisabled; |
| 189 switches::kGestureTyping); | |
| 190 return keyboard_switch == switches::kGestureTypingEnabled; | |
| 191 } | 189 } |
| 192 | 190 |
| 193 bool IsGestureEditingEnabled() { | 191 bool IsGestureEditingEnabled() { |
| 194 std::string keyboard_switch = | 192 std::string keyboard_switch = |
| 195 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 193 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 196 switches::kGestureEditing); | 194 switches::kGestureEditing); |
| 197 return keyboard_switch == switches::kGestureEditingEnabled; | 195 return keyboard_switch == switches::kGestureEditingEnabled; |
| 198 } | 196 } |
| 199 | 197 |
| 200 bool IsSmartDeployEnabled() { | 198 bool IsSmartDeployEnabled() { |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } | 471 } |
| 474 | 472 |
| 475 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 473 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
| 476 UMA_HISTOGRAM_ENUMERATION( | 474 UMA_HISTOGRAM_ENUMERATION( |
| 477 "VirtualKeyboard.KeyboardControlEvent", | 475 "VirtualKeyboard.KeyboardControlEvent", |
| 478 event, | 476 event, |
| 479 keyboard::KEYBOARD_CONTROL_MAX); | 477 keyboard::KEYBOARD_CONTROL_MAX); |
| 480 } | 478 } |
| 481 | 479 |
| 482 } // namespace keyboard | 480 } // namespace keyboard |
| OLD | NEW |