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

Side by Side Diff: ui/events/ozone/event_converter_ozone.cc

Issue 133233008: evdev: Move EventConverterOzone ownership from EventFactoryOzone to subclass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dropped EventConverterEvdev Created 6 years, 10 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
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/events/ozone/event_converter_ozone.h" 5 #include "ui/events/ozone/event_converter_ozone.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/message_loop/message_pump_ozone.h" 10 #include "base/message_loop/message_pump_ozone.h"
11 #include "ui/events/event.h" 11 #include "ui/events/event.h"
12 12
13 namespace { 13 namespace {
14 14
15 void DispatchEventHelper(scoped_ptr<ui::Event> key) { 15 void DispatchEventHelper(scoped_ptr<ui::Event> key) {
16 TRACE_EVENT1("ozone", "DispatchEventHelper", "type", key->type()); 16 TRACE_EVENT1("ozone", "DispatchEventHelper", "type", key->type());
17 base::MessagePumpOzone::Current()->Dispatch(key.get()); 17 base::MessagePumpOzone::Current()->Dispatch(key.get());
18 } 18 }
19 19
20 } // namespace 20 } // namespace
21 21
22 namespace ui { 22 namespace ui {
23 23
24 EventConverterOzone::EventConverterOzone() { 24 EventConverterOzone::EventConverterOzone() {
25 } 25 }
26 26
27 EventConverterOzone::~EventConverterOzone() { 27 EventConverterOzone::~EventConverterOzone() {
28 } 28 }
29 29
30 // static
30 void EventConverterOzone::DispatchEvent(scoped_ptr<ui::Event> event) { 31 void EventConverterOzone::DispatchEvent(scoped_ptr<ui::Event> event) {
31 base::MessageLoop::current()->PostTask( 32 base::MessageLoop::current()->PostTask(
32 FROM_HERE, base::Bind(&DispatchEventHelper, base::Passed(&event))); 33 FROM_HERE, base::Bind(&DispatchEventHelper, base::Passed(&event)));
33 } 34 }
34 35
35 } // namespace ui 36 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698