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

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

Issue 267723008: Retires ui::TranslatedKeyEvent and replaces it with KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed AcceleratorControllerTest.MAYBE_ProcessOnce more. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/events/event.cc ('k') | ui/wm/core/input_method_event_filter.cc » ('j') | 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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/keyboard/keyboard_switches.h" 21 #include "ui/keyboard/keyboard_switches.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 namespace { 24 namespace {
25 25
26 const char kKeyDown[] ="keydown"; 26 const char kKeyDown[] ="keydown";
27 const char kKeyUp[] = "keyup"; 27 const char kKeyUp[] = "keyup";
28 28
29 void SendProcessKeyEvent(ui::EventType type, 29 void SendProcessKeyEvent(ui::EventType type,
30 aura::WindowTreeHost* host) { 30 aura::WindowTreeHost* host) {
31 ui::TranslatedKeyEvent event(type == ui::ET_KEY_PRESSED, 31 ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::EF_NONE, false);
32 ui::VKEY_PROCESSKEY, 32 event.SetTranslated(true);
33 ui::EF_NONE);
34 ui::EventDispatchDetails details = 33 ui::EventDispatchDetails details =
35 host->event_processor()->OnEventFromSource(&event); 34 host->event_processor()->OnEventFromSource(&event);
36 CHECK(!details.dispatcher_destroyed); 35 CHECK(!details.dispatcher_destroyed);
37 } 36 }
38 37
39 base::LazyInstance<base::Time> g_keyboard_load_time_start = 38 base::LazyInstance<base::Time> g_keyboard_load_time_start =
40 LAZY_INSTANCE_INITIALIZER; 39 LAZY_INSTANCE_INITIALIZER;
41 40
42 bool g_accessibility_keyboard_enabled = false; 41 bool g_accessibility_keyboard_enabled = false;
43 42
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 337 }
339 338
340 void LogKeyboardControlEvent(KeyboardControlEvent event) { 339 void LogKeyboardControlEvent(KeyboardControlEvent event) {
341 UMA_HISTOGRAM_ENUMERATION( 340 UMA_HISTOGRAM_ENUMERATION(
342 "VirtualKeyboard.KeyboardControlEvent", 341 "VirtualKeyboard.KeyboardControlEvent",
343 event, 342 event,
344 keyboard::KEYBOARD_CONTROL_MAX); 343 keyboard::KEYBOARD_CONTROL_MAX);
345 } 344 }
346 345
347 } // namespace keyboard 346 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/events/event.cc ('k') | ui/wm/core/input_method_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698