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

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: 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 bool IsExperimentalInputViewEnabled() { 156 bool IsExperimentalInputViewEnabled() {
157 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 157 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
158 switches::kEnableExperimentalInputViewFeatures)) { 158 switches::kEnableExperimentalInputViewFeatures)) {
159 return true; 159 return true;
160 } 160 }
161 return false; 161 return false;
162 } 162 }
163 163
164 bool IsGestureTypingEnabled() {
165 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
166 switches::kEnableGestureTyping)) {
167 return true;
168 }
169 return false;
bshe 2015/01/21 16:53:47 Do you mind to clean up this code to: return base:
SteveT 2015/01/21 17:02:31 Sure. I was not sure if doing that was going to ca
170 }
171
164 bool InsertText(const base::string16& text) { 172 bool InsertText(const base::string16& text) {
165 keyboard::KeyboardController* controller = KeyboardController::GetInstance(); 173 keyboard::KeyboardController* controller = KeyboardController::GetInstance();
166 if (!controller) 174 if (!controller)
167 return false; 175 return false;
168 176
169 ui::InputMethod* input_method = controller->proxy()->GetInputMethod(); 177 ui::InputMethod* input_method = controller->proxy()->GetInputMethod();
170 if (!input_method) 178 if (!input_method)
171 return false; 179 return false;
172 180
173 ui::TextInputClient* tic = input_method->GetTextInputClient(); 181 ui::TextInputClient* tic = input_method->GetTextInputClient();
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 393 }
386 394
387 void LogKeyboardControlEvent(KeyboardControlEvent event) { 395 void LogKeyboardControlEvent(KeyboardControlEvent event) {
388 UMA_HISTOGRAM_ENUMERATION( 396 UMA_HISTOGRAM_ENUMERATION(
389 "VirtualKeyboard.KeyboardControlEvent", 397 "VirtualKeyboard.KeyboardControlEvent",
390 event, 398 event,
391 keyboard::KEYBOARD_CONTROL_MAX); 399 keyboard::KEYBOARD_CONTROL_MAX);
392 } 400 }
393 401
394 } // namespace keyboard 402 } // 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