OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 ui::EventDispatchDetails details = | 41 ui::EventDispatchDetails details = |
42 host->event_processor()->OnEventFromSource(&event); | 42 host->event_processor()->OnEventFromSource(&event); |
43 CHECK(!details.dispatcher_destroyed); | 43 CHECK(!details.dispatcher_destroyed); |
44 } | 44 } |
45 | 45 |
46 base::LazyInstance<base::Time> g_keyboard_load_time_start = | 46 base::LazyInstance<base::Time> g_keyboard_load_time_start = |
47 LAZY_INSTANCE_INITIALIZER; | 47 LAZY_INSTANCE_INITIALIZER; |
48 | 48 |
49 bool g_accessibility_keyboard_enabled = false; | 49 bool g_accessibility_keyboard_enabled = false; |
50 | 50 |
| 51 bool g_hotrod_keyboard_enabled = false; |
| 52 |
51 base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER; | 53 base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER; |
52 | 54 |
53 bool g_touch_keyboard_enabled = false; | 55 bool g_touch_keyboard_enabled = false; |
54 | 56 |
55 keyboard::KeyboardState g_requested_keyboard_state = | 57 keyboard::KeyboardState g_requested_keyboard_state = |
56 keyboard::KEYBOARD_STATE_AUTO; | 58 keyboard::KEYBOARD_STATE_AUTO; |
57 | 59 |
58 keyboard::KeyboardOverscrolOverride g_keyboard_overscroll_override = | 60 keyboard::KeyboardOverscrolOverride g_keyboard_overscroll_override = |
59 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE; | 61 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE; |
60 | 62 |
(...skipping 14 matching lines...) Expand all Loading... |
75 } | 77 } |
76 | 78 |
77 void SetAccessibilityKeyboardEnabled(bool enabled) { | 79 void SetAccessibilityKeyboardEnabled(bool enabled) { |
78 g_accessibility_keyboard_enabled = enabled; | 80 g_accessibility_keyboard_enabled = enabled; |
79 } | 81 } |
80 | 82 |
81 bool GetAccessibilityKeyboardEnabled() { | 83 bool GetAccessibilityKeyboardEnabled() { |
82 return g_accessibility_keyboard_enabled; | 84 return g_accessibility_keyboard_enabled; |
83 } | 85 } |
84 | 86 |
| 87 void SetHotrodKeyboardEnabled(bool enabled) { |
| 88 g_hotrod_keyboard_enabled = enabled; |
| 89 } |
| 90 |
| 91 bool GetHotrodKeyboardEnabled() { |
| 92 return g_hotrod_keyboard_enabled; |
| 93 } |
| 94 |
85 void SetTouchKeyboardEnabled(bool enabled) { | 95 void SetTouchKeyboardEnabled(bool enabled) { |
86 g_touch_keyboard_enabled = enabled; | 96 g_touch_keyboard_enabled = enabled; |
87 } | 97 } |
88 | 98 |
89 bool GetTouchKeyboardEnabled() { | 99 bool GetTouchKeyboardEnabled() { |
90 return g_touch_keyboard_enabled; | 100 return g_touch_keyboard_enabled; |
91 } | 101 } |
92 | 102 |
93 void SetRequestedKeyboardState(KeyboardState state) { | 103 void SetRequestedKeyboardState(KeyboardState state) { |
94 g_requested_keyboard_state = state; | 104 g_requested_keyboard_state = state; |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 } | 482 } |
473 | 483 |
474 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 484 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
475 UMA_HISTOGRAM_ENUMERATION( | 485 UMA_HISTOGRAM_ENUMERATION( |
476 "VirtualKeyboard.KeyboardControlEvent", | 486 "VirtualKeyboard.KeyboardControlEvent", |
477 event, | 487 event, |
478 keyboard::KEYBOARD_CONTROL_MAX); | 488 keyboard::KEYBOARD_CONTROL_MAX); |
479 } | 489 } |
480 | 490 |
481 } // namespace keyboard | 491 } // namespace keyboard |
OLD | NEW |