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

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

Issue 848843003: Add a --enable-gesture-typing flag. Currently this flag does nothing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add histogram enume ntry Created 5 years, 11 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') | ui/keyboard/resources/keyboard_mojo.js » ('j') | 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 switches::kEnableInputView)) 147 switches::kEnableInputView))
148 return true; 148 return true;
149 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 149 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
150 switches::kDisableInputView)) 150 switches::kDisableInputView))
151 return false; 151 return false;
152 // Default value if no command line flags specified. 152 // Default value if no command line flags specified.
153 return true; 153 return true;
154 } 154 }
155 155
156 bool IsExperimentalInputViewEnabled() { 156 bool IsExperimentalInputViewEnabled() {
157 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 157 return base::CommandLine::ForCurrentProcess()->HasSwitch(
158 switches::kEnableExperimentalInputViewFeatures)) { 158 switches::kEnableExperimentalInputViewFeatures);
159 return true; 159 }
160 } 160
161 return false; 161 bool IsGestureTypingEnabled() {
162 return base::CommandLine::ForCurrentProcess()->HasSwitch(
163 switches::kEnableGestureTyping);
162 } 164 }
163 165
164 bool InsertText(const base::string16& text) { 166 bool InsertText(const base::string16& text) {
165 keyboard::KeyboardController* controller = KeyboardController::GetInstance(); 167 keyboard::KeyboardController* controller = KeyboardController::GetInstance();
166 if (!controller) 168 if (!controller)
167 return false; 169 return false;
168 170
169 ui::InputMethod* input_method = controller->proxy()->GetInputMethod(); 171 ui::InputMethod* input_method = controller->proxy()->GetInputMethod();
170 if (!input_method) 172 if (!input_method)
171 return false; 173 return false;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 387 }
386 388
387 void LogKeyboardControlEvent(KeyboardControlEvent event) { 389 void LogKeyboardControlEvent(KeyboardControlEvent event) {
388 UMA_HISTOGRAM_ENUMERATION( 390 UMA_HISTOGRAM_ENUMERATION(
389 "VirtualKeyboard.KeyboardControlEvent", 391 "VirtualKeyboard.KeyboardControlEvent",
390 event, 392 event,
391 keyboard::KEYBOARD_CONTROL_MAX); 393 keyboard::KEYBOARD_CONTROL_MAX);
392 } 394 }
393 395
394 } // namespace keyboard 396 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/keyboard/keyboard_util.h ('k') | ui/keyboard/resources/keyboard_mojo.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698