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

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

Issue 1321543010: Make IsGestureTyping enabled on by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | 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/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
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 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
188 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 188 switches::kGestureTyping)) {
189 switches::kGestureTyping); 189 return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
190 return keyboard_switch == switches::kGestureTypingEnabled; 190 switches::kGestureTyping) == switches::kGestureTypingEnabled;
bshe 2015/09/04 14:07:25 perhaps just do: keyboard_switch != switches::kGes
SteveT 2015/09/04 17:50:13 Oh right, because GetSwitchValueASCII returns "" i
191 }
192 // Default value if no command line flags specified.
193 return true;
191 } 194 }
192 195
193 bool IsGestureEditingEnabled() { 196 bool IsGestureEditingEnabled() {
194 std::string keyboard_switch = 197 std::string keyboard_switch =
195 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 198 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
196 switches::kGestureEditing); 199 switches::kGestureEditing);
197 return keyboard_switch == switches::kGestureEditingEnabled; 200 return keyboard_switch == switches::kGestureEditingEnabled;
198 } 201 }
199 202
200 bool IsSmartDeployEnabled() { 203 bool IsSmartDeployEnabled() {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 476 }
474 477
475 void LogKeyboardControlEvent(KeyboardControlEvent event) { 478 void LogKeyboardControlEvent(KeyboardControlEvent event) {
476 UMA_HISTOGRAM_ENUMERATION( 479 UMA_HISTOGRAM_ENUMERATION(
477 "VirtualKeyboard.KeyboardControlEvent", 480 "VirtualKeyboard.KeyboardControlEvent",
478 event, 481 event,
479 keyboard::KEYBOARD_CONTROL_MAX); 482 keyboard::KEYBOARD_CONTROL_MAX);
480 } 483 }
481 484
482 } // namespace keyboard 485 } // namespace keyboard
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698