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

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

Issue 62833010: Reland "Add a full screen virtual keyboard to virtual keyboard root window" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: format nit. The main change is patchset 2 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
« 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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 24 matching lines...) Expand all
35 base::LazyInstance<base::Time> g_keyboard_load_time_start = 35 base::LazyInstance<base::Time> g_keyboard_load_time_start =
36 LAZY_INSTANCE_INITIALIZER; 36 LAZY_INSTANCE_INITIALIZER;
37 37
38 } // namespace 38 } // namespace
39 39
40 namespace keyboard { 40 namespace keyboard {
41 41
42 bool IsKeyboardEnabled() { 42 bool IsKeyboardEnabled() {
43 return CommandLine::ForCurrentProcess()->HasSwitch( 43 return CommandLine::ForCurrentProcess()->HasSwitch(
44 switches::kEnableVirtualKeyboard) || 44 switches::kEnableVirtualKeyboard) ||
45 CommandLine::ForCurrentProcess()->HasSwitch( 45 IsKeyboardUsabilityExperimentEnabled();
46 switches::kKeyboardUsabilityTest); 46 }
47 47
48 bool IsKeyboardUsabilityExperimentEnabled() {
49 return CommandLine::ForCurrentProcess()->HasSwitch(
50 switches::kKeyboardUsabilityExperiment);
48 } 51 }
49 52
50 bool InsertText(const base::string16& text, aura::Window* root_window) { 53 bool InsertText(const base::string16& text, aura::Window* root_window) {
51 if (!root_window) 54 if (!root_window)
52 return false; 55 return false;
53 56
54 ui::InputMethod* input_method = root_window->GetProperty( 57 ui::InputMethod* input_method = root_window->GetProperty(
55 aura::client::kRootWindowInputMethodKey); 58 aura::client::kRootWindowInputMethodKey);
56 if (!input_method) 59 if (!input_method)
57 return false; 60 return false;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 249 }
247 250
248 void LogKeyboardControlEvent(KeyboardControlEvent event) { 251 void LogKeyboardControlEvent(KeyboardControlEvent event) {
249 UMA_HISTOGRAM_ENUMERATION( 252 UMA_HISTOGRAM_ENUMERATION(
250 "VirtualKeyboard.KeyboardControlEvent", 253 "VirtualKeyboard.KeyboardControlEvent",
251 event, 254 event,
252 keyboard::KEYBOARD_CONTROL_MAX); 255 keyboard::KEYBOARD_CONTROL_MAX);
253 } 256 }
254 257
255 } // namespace keyboard 258 } // 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