Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: ui/keyboard/keyboard_util.cc

Issue 1209663002: Use EventHandler for IME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/ime/input_method_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 #include "ui/keyboard/keyboard_switches.h" 28 #include "ui/keyboard/keyboard_switches.h"
29 #include "url/gurl.h" 29 #include "url/gurl.h"
30 30
31 namespace { 31 namespace {
32 32
33 const char kKeyDown[] ="keydown"; 33 const char kKeyDown[] ="keydown";
34 const char kKeyUp[] = "keyup"; 34 const char kKeyUp[] = "keyup";
35 35
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, ui::EF_NONE, 38 ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::DomCode::NONE,
39 ui::DomKey::PROCESS, 0, ui::EventTimeForNow()); 39 ui::EF_IS_SYNTHESIZED, ui::DomKey::PROCESS, 0,
40 ui::EventTimeForNow());
40 ui::EventDispatchDetails details = 41 ui::EventDispatchDetails details =
41 host->event_processor()->OnEventFromSource(&event); 42 host->event_processor()->OnEventFromSource(&event);
42 CHECK(!details.dispatcher_destroyed); 43 CHECK(!details.dispatcher_destroyed);
43 } 44 }
44 45
45 base::LazyInstance<base::Time> g_keyboard_load_time_start = 46 base::LazyInstance<base::Time> g_keyboard_load_time_start =
46 LAZY_INSTANCE_INITIALIZER; 47 LAZY_INSTANCE_INITIALIZER;
47 48
48 bool g_accessibility_keyboard_enabled = false; 49 bool g_accessibility_keyboard_enabled = false;
49 50
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 451 }
451 452
452 void LogKeyboardControlEvent(KeyboardControlEvent event) { 453 void LogKeyboardControlEvent(KeyboardControlEvent event) {
453 UMA_HISTOGRAM_ENUMERATION( 454 UMA_HISTOGRAM_ENUMERATION(
454 "VirtualKeyboard.KeyboardControlEvent", 455 "VirtualKeyboard.KeyboardControlEvent",
455 event, 456 event,
456 keyboard::KEYBOARD_CONTROL_MAX); 457 keyboard::KEYBOARD_CONTROL_MAX);
457 } 458 }
458 459
459 } // namespace keyboard 460 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698