| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 } | 485 } |
| 476 | 486 |
| 477 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 487 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
| 478 UMA_HISTOGRAM_ENUMERATION( | 488 UMA_HISTOGRAM_ENUMERATION( |
| 479 "VirtualKeyboard.KeyboardControlEvent", | 489 "VirtualKeyboard.KeyboardControlEvent", |
| 480 event, | 490 event, |
| 481 keyboard::KEYBOARD_CONTROL_MAX); | 491 keyboard::KEYBOARD_CONTROL_MAX); |
| 482 } | 492 } |
| 483 | 493 |
| 484 } // namespace keyboard | 494 } // namespace keyboard |
| OLD | NEW |