Chromium Code Reviews| Index: ui/events/ozone/event_factory_ozone.cc |
| diff --git a/ui/events/ozone/event_factory_ozone.cc b/ui/events/ozone/event_factory_ozone.cc |
| index 409befde5b96e6fe7e6f912dfad1330d51d1a89c..17771357e36775634ae558a5f2e7540c951f71ee 100644 |
| --- a/ui/events/ozone/event_factory_ozone.cc |
| +++ b/ui/events/ozone/event_factory_ozone.cc |
| @@ -5,12 +5,23 @@ |
| #include "ui/events/ozone/event_factory_ozone.h" |
| #include "base/command_line.h" |
| +#include "base/debug/trace_event.h" |
| #include "base/message_loop/message_pump_ozone.h" |
| #include "base/strings/stringprintf.h" |
| +#include "ui/events/event.h" |
| #include "ui/events/event_switches.h" |
| namespace ui { |
| +namespace { |
| + |
| +void DispatchEventHelper(scoped_ptr<ui::Event> key) { |
| + TRACE_EVENT1("ozone", "DispatchEventHelper", "type", key->type()); |
|
rjkroege
2014/01/29 17:01:43
it is worth perhaps expanding the text in this tra
spang
2014/01/29 17:58:55
Agree the name could be clearer. Any ideas?
Dispa
|
| + base::MessagePumpOzone::Current()->Dispatch(key.get()); |
| +} |
| + |
| +} // namespace |
| + |
| // static |
| EventFactoryOzone* EventFactoryOzone::impl_ = NULL; |
| @@ -27,4 +38,10 @@ void EventFactoryOzone::SetInstance(EventFactoryOzone* impl) { impl_ = impl; } |
| void EventFactoryOzone::StartProcessingEvents() {} |
| +// static |
| +void EventFactoryOzone::DispatchEvent(scoped_ptr<ui::Event> event) { |
| + base::MessageLoop::current()->PostTask( |
| + FROM_HERE, base::Bind(&DispatchEventHelper, base::Passed(&event))); |
| +} |
| + |
| } // namespace ui |