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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 if (!IsKeyboardEnabled()) | 111 if (!IsKeyboardEnabled()) |
112 return false; | 112 return false; |
113 // Users of the accessibility on-screen keyboard are likely to be using mouse | 113 // Users of the accessibility on-screen keyboard are likely to be using mouse |
114 // input, which may interfere with overscrolling. | 114 // input, which may interfere with overscrolling. |
115 if (g_accessibility_keyboard_enabled) | 115 if (g_accessibility_keyboard_enabled) |
116 return false; | 116 return false; |
117 if (CommandLine::ForCurrentProcess()->HasSwitch( | 117 if (CommandLine::ForCurrentProcess()->HasSwitch( |
118 switches::kDisableVirtualKeyboardOverscroll)) { | 118 switches::kDisableVirtualKeyboardOverscroll)) { |
119 return false; | 119 return false; |
120 } | 120 } |
121 return true; | 121 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 122 switches::kEnableVirtualKeyboardOverscroll)) { |
| 123 return true; |
| 124 } |
| 125 return false; |
122 } | 126 } |
123 | 127 |
124 bool IsInputViewEnabled() { | 128 bool IsInputViewEnabled() { |
125 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableInputView)) | 129 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableInputView)) |
126 return true; | 130 return true; |
127 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableInputView)) | 131 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableInputView)) |
128 return false; | 132 return false; |
129 // Default value if no command line flags specified. | 133 // Default value if no command line flags specified. |
130 return true; | 134 return true; |
131 } | 135 } |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 343 } |
340 | 344 |
341 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 345 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
342 UMA_HISTOGRAM_ENUMERATION( | 346 UMA_HISTOGRAM_ENUMERATION( |
343 "VirtualKeyboard.KeyboardControlEvent", | 347 "VirtualKeyboard.KeyboardControlEvent", |
344 event, | 348 event, |
345 keyboard::KEYBOARD_CONTROL_MAX); | 349 keyboard::KEYBOARD_CONTROL_MAX); |
346 } | 350 } |
347 | 351 |
348 } // namespace keyboard | 352 } // namespace keyboard |
OLD | NEW |