| 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 #ifndef UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ | 5 #ifndef UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ |
| 6 #define UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ | 6 #define UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop/message_pump_libevent.h" | 11 #include "base/message_loop/message_pump_libevent.h" |
| 12 #include "base/task_runner.h" | 12 #include "base/task_runner.h" |
| 13 #include "ui/events/events_export.h" | 13 #include "ui/events/events_export.h" |
| 14 #include "ui/events/platform/platform_event_source.h" | 14 #include "ui/events/platform/platform_event_source.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class PointF; | 18 class PointF; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ui { | 21 namespace ui { |
| 22 | 22 |
| 23 class Event; | 23 class Event; |
| 24 | 24 |
| 25 // Creates and dispatches |ui.Event|'s. Ozone assumes that events arrive on file | 25 // Creates and dispatches |ui.Event|'s. Ozone assumes that events arrive on file |
| 26 // descriptors with one |EventConverterOzone| instance for each descriptor. | 26 // descriptors with one |EventConverterOzone| instance for each descriptor. |
| 27 // Ozone presumes that the set of file desctiprtors can vary at runtime so this | 27 // Ozone presumes that the set of file desctiprtors can vary at runtime so this |
| 28 // class supports dynamically adding and removing |EventConverterOzone| | 28 // class supports dynamically adding and removing |EventConverterOzone| |
| 29 // instances as necessary. | 29 // instances as necessary. |
| 30 class EVENTS_EXPORT EventFactoryOzone : public ui::PlatformEventSource { | 30 class EVENTS_EXPORT EventFactoryOzone /* : public ui::PlatformEventSource */ { |
| 31 public: | 31 public: |
| 32 EventFactoryOzone(); | 32 EventFactoryOzone(); |
| 33 virtual ~EventFactoryOzone(); | 33 virtual ~EventFactoryOzone(); |
| 34 | 34 |
| 35 // Called from WindowTreeHostOzone to initialize and start processing events. | 35 // Called from WindowTreeHostOzone to initialize and start processing events. |
| 36 // This should create the initial set of converters, and potentially arrange | 36 // This should create the initial set of converters, and potentially arrange |
| 37 // for more converters to be created as new event sources become available. | 37 // for more converters to be created as new event sources become available. |
| 38 // No events processing should happen until this is called. All processes have | 38 // No events processing should happen until this is called. All processes have |
| 39 // an EventFactoryOzone but not all of them should process events. In chrome, | 39 // an EventFactoryOzone but not all of them should process events. In chrome, |
| 40 // events are dispatched in the browser process on the UI thread. | 40 // events are dispatched in the browser process on the UI thread. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 static EventFactoryOzone* impl_; // not owned | 61 static EventFactoryOzone* impl_; // not owned |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone); | 63 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace ui | 66 } // namespace ui |
| 67 | 67 |
| 68 #endif // UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ | 68 #endif // UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ |
| OLD | NEW |