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

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

Issue 1130833005: Merge gesture deletion and selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 5 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
« no previous file with comments | « ui/keyboard/keyboard_util.h ('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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 switches::kFloatingVirtualKeyboardEnabled; 163 switches::kFloatingVirtualKeyboardEnabled;
164 } 164 }
165 165
166 bool IsGestureTypingEnabled() { 166 bool IsGestureTypingEnabled() {
167 std::string keyboard_switch = 167 std::string keyboard_switch =
168 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 168 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
169 switches::kGestureTyping); 169 switches::kGestureTyping);
170 return keyboard_switch == switches::kGestureTypingEnabled; 170 return keyboard_switch == switches::kGestureTypingEnabled;
171 } 171 }
172 172
173 bool IsGestureSelectionEnabled() { 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::kGestureSelection); 176 switches::kGestureEditing);
177 return keyboard_switch != switches::kGestureSelectionDisabled; 177 return keyboard_switch == switches::kGestureEditingEnabled;
178 }
179
180 bool IsGestureDeletionEnabled() {
181 std::string keyboard_switch =
182 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
183 switches::kGestureDeletion);
184 return keyboard_switch != switches::kGestureDeletionDisabled;
185 } 178 }
186 179
187 bool IsMaterialDesignEnabled() { 180 bool IsMaterialDesignEnabled() {
188 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 181 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
189 switches::kDisableNewMDInputView); 182 switches::kDisableNewMDInputView);
190 } 183 }
191 184
192 bool IsVoiceInputEnabled() { 185 bool IsVoiceInputEnabled() {
193 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 186 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
194 switches::kDisableVoiceInput); 187 switches::kDisableVoiceInput);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 442 }
450 443
451 void LogKeyboardControlEvent(KeyboardControlEvent event) { 444 void LogKeyboardControlEvent(KeyboardControlEvent event) {
452 UMA_HISTOGRAM_ENUMERATION( 445 UMA_HISTOGRAM_ENUMERATION(
453 "VirtualKeyboard.KeyboardControlEvent", 446 "VirtualKeyboard.KeyboardControlEvent",
454 event, 447 event,
455 keyboard::KEYBOARD_CONTROL_MAX); 448 keyboard::KEYBOARD_CONTROL_MAX);
456 } 449 }
457 450
458 } // namespace keyboard 451 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/keyboard/keyboard_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698