Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 #include "ui/keyboard/keyboard_switches.h" | 26 #include "ui/keyboard/keyboard_switches.h" |
| 27 #include "ui/keyboard/keyboard_ui.h" | 27 #include "ui/keyboard/keyboard_ui.h" |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 const char kKeyDown[] ="keydown"; | 31 const char kKeyDown[] ="keydown"; |
| 32 const char kKeyUp[] = "keyup"; | 32 const char kKeyUp[] = "keyup"; |
| 33 | 33 |
| 34 void SendProcessKeyEvent(ui::EventType type, | 34 void SendProcessKeyEvent(ui::EventType type, |
| 35 aura::WindowTreeHost* host) { | 35 aura::WindowTreeHost* host) { |
| 36 NOTIMPLEMENTED() << " SENDING"; | |
|
oshima
2016/08/23 04:53:43
nit: debug log?
| |
| 36 ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::DomCode::NONE, | 37 ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::DomCode::NONE, |
| 37 ui::EF_IS_SYNTHESIZED, ui::DomKey::PROCESS, | 38 ui::EF_IS_SYNTHESIZED, ui::DomKey::PROCESS, |
| 38 ui::EventTimeForNow()); | 39 ui::EventTimeForNow()); |
| 39 ui::EventDispatchDetails details = | 40 ui::EventDispatchDetails details = |
| 40 host->event_processor()->OnEventFromSource(&event); | 41 host->event_processor()->OnEventFromSource(&event); |
| 41 CHECK(!details.dispatcher_destroyed); | 42 CHECK(!details.dispatcher_destroyed); |
| 42 } | 43 } |
| 43 | 44 |
| 44 base::LazyInstance<base::Time> g_keyboard_load_time_start = | 45 base::LazyInstance<base::Time> g_keyboard_load_time_start = |
| 45 LAZY_INSTANCE_INITIALIZER; | 46 LAZY_INSTANCE_INITIALIZER; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 372 } | 373 } |
| 373 | 374 |
| 374 void LogKeyboardControlEvent(KeyboardControlEvent event) { | 375 void LogKeyboardControlEvent(KeyboardControlEvent event) { |
| 375 UMA_HISTOGRAM_ENUMERATION( | 376 UMA_HISTOGRAM_ENUMERATION( |
| 376 "VirtualKeyboard.KeyboardControlEvent", | 377 "VirtualKeyboard.KeyboardControlEvent", |
| 377 event, | 378 event, |
| 378 keyboard::KEYBOARD_CONTROL_MAX); | 379 keyboard::KEYBOARD_CONTROL_MAX); |
| 379 } | 380 } |
| 380 | 381 |
| 381 } // namespace keyboard | 382 } // namespace keyboard |
| OLD | NEW |