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

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

Issue 1315233006: Add chrome.virtualKeyboardPrivate.setHotrodKeyboard api (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ui::EventDispatchDetails details = 43 ui::EventDispatchDetails details =
44 host->event_processor()->OnEventFromSource(&event); 44 host->event_processor()->OnEventFromSource(&event);
45 CHECK(!details.dispatcher_destroyed); 45 CHECK(!details.dispatcher_destroyed);
46 } 46 }
47 47
48 base::LazyInstance<base::Time> g_keyboard_load_time_start = 48 base::LazyInstance<base::Time> g_keyboard_load_time_start =
49 LAZY_INSTANCE_INITIALIZER; 49 LAZY_INSTANCE_INITIALIZER;
50 50
51 bool g_accessibility_keyboard_enabled = false; 51 bool g_accessibility_keyboard_enabled = false;
52 52
53 bool g_hotrod_keyboard_enabled = false;
54
53 base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER; 55 base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER;
54 56
55 bool g_touch_keyboard_enabled = false; 57 bool g_touch_keyboard_enabled = false;
56 58
57 keyboard::KeyboardState g_requested_keyboard_state = 59 keyboard::KeyboardState g_requested_keyboard_state =
58 keyboard::KEYBOARD_STATE_AUTO; 60 keyboard::KEYBOARD_STATE_AUTO;
59 61
60 keyboard::KeyboardOverscrolOverride g_keyboard_overscroll_override = 62 keyboard::KeyboardOverscrolOverride g_keyboard_overscroll_override =
61 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE; 63 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE;
62 64
(...skipping 14 matching lines...) Expand all
77 } 79 }
78 80
79 void SetAccessibilityKeyboardEnabled(bool enabled) { 81 void SetAccessibilityKeyboardEnabled(bool enabled) {
80 g_accessibility_keyboard_enabled = enabled; 82 g_accessibility_keyboard_enabled = enabled;
81 } 83 }
82 84
83 bool GetAccessibilityKeyboardEnabled() { 85 bool GetAccessibilityKeyboardEnabled() {
84 return g_accessibility_keyboard_enabled; 86 return g_accessibility_keyboard_enabled;
85 } 87 }
86 88
89 void SetHotrodKeyboardEnabled(bool enabled) {
90 g_hotrod_keyboard_enabled = enabled;
91 }
92
93 bool GetHotrodKeyboardEnabled() {
94 return g_hotrod_keyboard_enabled;
95 }
96
87 void SetTouchKeyboardEnabled(bool enabled) { 97 void SetTouchKeyboardEnabled(bool enabled) {
88 g_touch_keyboard_enabled = enabled; 98 g_touch_keyboard_enabled = enabled;
89 } 99 }
90 100
91 bool GetTouchKeyboardEnabled() { 101 bool GetTouchKeyboardEnabled() {
92 return g_touch_keyboard_enabled; 102 return g_touch_keyboard_enabled;
93 } 103 }
94 104
95 void SetRequestedKeyboardState(KeyboardState state) { 105 void SetRequestedKeyboardState(KeyboardState state) {
96 g_requested_keyboard_state = state; 106 g_requested_keyboard_state = state;
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 483 }
474 484
475 void LogKeyboardControlEvent(KeyboardControlEvent event) { 485 void LogKeyboardControlEvent(KeyboardControlEvent event) {
476 UMA_HISTOGRAM_ENUMERATION( 486 UMA_HISTOGRAM_ENUMERATION(
477 "VirtualKeyboard.KeyboardControlEvent", 487 "VirtualKeyboard.KeyboardControlEvent",
478 event, 488 event,
479 keyboard::KEYBOARD_CONTROL_MAX); 489 keyboard::KEYBOARD_CONTROL_MAX);
480 } 490 }
481 491
482 } // namespace keyboard 492 } // 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