| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_EVENTS_OZONE_EVENT_CONVERTER_OZONE_H_ | |
| 6 #define UI_EVENTS_OZONE_EVENT_CONVERTER_OZONE_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "ui/events/events_export.h" | |
| 10 | |
| 11 namespace ui { | |
| 12 class Event; | |
| 13 | |
| 14 // Ozone implementations can generate input events in whatever way is | |
| 15 // appropriate for the platform. | |
| 16 // This class provides the functionality needed in common across all | |
| 17 // converters: dispatching the |ui::Event| to aura. | |
| 18 class EVENTS_EXPORT EventConverterOzone { | |
| 19 public: | |
| 20 EventConverterOzone(); | |
| 21 virtual ~EventConverterOzone(); | |
| 22 | |
| 23 protected: | |
| 24 // Subclasses should use this method to post a task that will dispatch | |
| 25 // |event| from the UI message loop. This method takes ownership of | |
| 26 // |event|. |event| will be deleted at the end of the posted task. | |
| 27 virtual void DispatchEvent(scoped_ptr<ui::Event> event); | |
| 28 | |
| 29 private: | |
| 30 DISALLOW_COPY_AND_ASSIGN(EventConverterOzone); | |
| 31 }; | |
| 32 | |
| 33 } // namespace ui | |
| 34 | |
| 35 #endif // UI_EVENTS_OZONE_EVENT_CONVERTER_OZONE_H_ | |
| OLD | NEW |