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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 void SendProcessKeyEvent(ui::EventType type, | 36 void SendProcessKeyEvent(ui::EventType type, |
37 aura::WindowTreeHost* host) { | 37 aura::WindowTreeHost* host) { |
38 ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::DomCode::NONE, | 38 ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::DomCode::NONE, |
39 ui::EF_IS_SYNTHESIZED, ui::DomKey::PROCESS, | 39 ui::EF_IS_SYNTHESIZED, ui::DomKey::PROCESS, |
40 ui::EventTimeForNow()); | 40 ui::EventTimeForNow()); |
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>::DestructorAtExit 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; | 51 bool g_hotrod_keyboard_enabled = false; |
52 | 52 |
53 bool g_keyboard_restricted = false; | 53 bool g_keyboard_restricted = false; |
54 | 54 |
55 bool g_touch_keyboard_enabled = false; | 55 bool g_touch_keyboard_enabled = false; |
56 | 56 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 "VirtualKeyboard.KeyboardControlEvent", | 395 "VirtualKeyboard.KeyboardControlEvent", |
396 event, | 396 event, |
397 keyboard::KEYBOARD_CONTROL_MAX); | 397 keyboard::KEYBOARD_CONTROL_MAX); |
398 } | 398 } |
399 | 399 |
400 void SetOverscrollEnabledWithAccessibilityKeyboard(bool enabled) { | 400 void SetOverscrollEnabledWithAccessibilityKeyboard(bool enabled) { |
401 g_overscroll_enabled_with_accessibility_keyboard = enabled; | 401 g_overscroll_enabled_with_accessibility_keyboard = enabled; |
402 } | 402 } |
403 | 403 |
404 } // namespace keyboard | 404 } // namespace keyboard |
OLD | NEW |