| 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::KeyboardOverscrolOverride g_keyboard_overscroll_override = | 57 keyboard::KeyboardOverscrolOverride g_keyboard_overscroll_override = |
| 56 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE; | 58 keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE; |
| 57 | 59 |
| 58 keyboard::KeyboardShowOverride g_keyboard_show_override = | 60 keyboard::KeyboardShowOverride g_keyboard_show_override = |
| 59 keyboard::KEYBOARD_SHOW_OVERRIDE_NONE; | 61 keyboard::KEYBOARD_SHOW_OVERRIDE_NONE; |
| 60 | 62 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 72 } | 74 } |
| 73 | 75 |
| 74 void SetAccessibilityKeyboardEnabled(bool enabled) { | 76 void SetAccessibilityKeyboardEnabled(bool enabled) { |
| 75 g_accessibility_keyboard_enabled = enabled; | 77 g_accessibility_keyboard_enabled = enabled; |
| 76 } | 78 } |
| 77 | 79 |
| 78 bool GetAccessibilityKeyboardEnabled() { | 80 bool GetAccessibilityKeyboardEnabled() { |
| 79 return g_accessibility_keyboard_enabled; | 81 return g_accessibility_keyboard_enabled; |
| 80 } | 82 } |
| 81 | 83 |
| 84 void SetHotrodKeyboardEnabled(bool enabled) { |
| 85 g_hotrod_keyboard_enabled = enabled; |
| 86 } |
| 87 |
| 88 bool GetHotrodKeyboardEnabled() { |
| 89 return g_hotrod_keyboard_enabled; |
| 90 } |
| 91 |
| 82 void SetTouchKeyboardEnabled(bool enabled) { | 92 void SetTouchKeyboardEnabled(bool enabled) { |
| 83 g_touch_keyboard_enabled = enabled; | 93 g_touch_keyboard_enabled = enabled; |
| 84 } | 94 } |
| 85 | 95 |
| 86 bool GetTouchKeyboardEnabled() { | 96 bool GetTouchKeyboardEnabled() { |
| 87 return g_touch_keyboard_enabled; | 97 return g_touch_keyboard_enabled; |
| 88 } | 98 } |
| 89 | 99 |
| 90 std::string GetKeyboardLayout() { | 100 std::string GetKeyboardLayout() { |
| 91 // TODO(bshe): layout string is currently hard coded. We should use more | 101 // TODO(bshe): layout string is currently hard coded. We should use more |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 463 } |
| 454 | 464 |
| 455 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 465 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
| 456 UMA_HISTOGRAM_ENUMERATION( | 466 UMA_HISTOGRAM_ENUMERATION( |
| 457 "VirtualKeyboard.KeyboardControlEvent", | 467 "VirtualKeyboard.KeyboardControlEvent", |
| 458 event, | 468 event, |
| 459 keyboard::KEYBOARD_CONTROL_MAX); | 469 keyboard::KEYBOARD_CONTROL_MAX); |
| 460 } | 470 } |
| 461 | 471 |
| 462 } // namespace keyboard | 472 } // namespace keyboard |
| OLD | NEW |