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

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

Issue 34783006: Add --keyboard-usability-test flag and always show keyboard unless manually hide (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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/logging.h" 10 #include "base/logging.h"
(...skipping 18 matching lines...) Expand all
29 ui::EF_NONE); 29 ui::EF_NONE);
30 root_window->AsRootWindowHostDelegate()->OnHostKeyEvent(&event); 30 root_window->AsRootWindowHostDelegate()->OnHostKeyEvent(&event);
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 namespace keyboard { 35 namespace keyboard {
36 36
37 bool IsKeyboardEnabled() { 37 bool IsKeyboardEnabled() {
38 return CommandLine::ForCurrentProcess()->HasSwitch( 38 return CommandLine::ForCurrentProcess()->HasSwitch(
39 switches::kEnableVirtualKeyboard); 39 switches::kEnableVirtualKeyboard) ||
40 CommandLine::ForCurrentProcess()->HasSwitch(
41 switches::kKeyboardUsabilityTest);
42
40 } 43 }
41 44
42 bool InsertText(const base::string16& text, aura::RootWindow* root_window) { 45 bool InsertText(const base::string16& text, aura::RootWindow* root_window) {
43 if (!root_window) 46 if (!root_window)
44 return false; 47 return false;
45 48
46 ui::InputMethod* input_method = root_window->GetProperty( 49 ui::InputMethod* input_method = root_window->GetProperty(
47 aura::client::kRootWindowInputMethodKey); 50 aura::client::kRootWindowInputMethodKey);
48 if (!input_method) 51 if (!input_method)
49 return false; 52 return false;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 223 }
221 224
222 void LogKeyboardControlEvent(KeyboardControlEvent event) { 225 void LogKeyboardControlEvent(KeyboardControlEvent event) {
223 UMA_HISTOGRAM_ENUMERATION( 226 UMA_HISTOGRAM_ENUMERATION(
224 "VirtualKeyboard.KeyboardControlEvent", 227 "VirtualKeyboard.KeyboardControlEvent",
225 event, 228 event,
226 keyboard::KEYBOARD_CONTROL_MAX); 229 keyboard::KEYBOARD_CONTROL_MAX);
227 } 230 }
228 231
229 } // namespace keyboard 232 } // namespace keyboard
OLDNEW
« ui/keyboard/keyboard_controller_unittest.cc ('K') | « ui/keyboard/keyboard_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698