Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: ui/keyboard/keyboard_util.cc

Issue 266513003: Reland enable VK overscroll by default. Fixed ash unittest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-enable flag. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 if (CommandLine::ForCurrentProcess()->HasSwitch( 121 return true;
122 switches::kEnableVirtualKeyboardOverscroll)) {
123 return true;
124 }
125 return false;
126 } 122 }
127 123
128 bool IsInputViewEnabled() { 124 bool IsInputViewEnabled() {
129 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableInputView)) 125 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableInputView))
130 return true; 126 return true;
131 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableInputView)) 127 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableInputView))
132 return false; 128 return false;
133 // Default value if no command line flags specified. 129 // Default value if no command line flags specified.
134 return true; 130 return true;
135 } 131 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 339 }
344 340
345 void LogKeyboardControlEvent(KeyboardControlEvent event) { 341 void LogKeyboardControlEvent(KeyboardControlEvent event) {
346 UMA_HISTOGRAM_ENUMERATION( 342 UMA_HISTOGRAM_ENUMERATION(
347 "VirtualKeyboard.KeyboardControlEvent", 343 "VirtualKeyboard.KeyboardControlEvent",
348 event, 344 event,
349 keyboard::KEYBOARD_CONTROL_MAX); 345 keyboard::KEYBOARD_CONTROL_MAX);
350 } 346 }
351 347
352 } // namespace keyboard 348 } // namespace keyboard
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698