| 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" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // an EventFactoryOzone but not all of them should process events. In chrome, | 37 // an EventFactoryOzone but not all of them should process events. In chrome, |
| 38 // events are dispatched in the browser process on the UI thread. | 38 // events are dispatched in the browser process on the UI thread. |
| 39 virtual void StartProcessingEvents(); | 39 virtual void StartProcessingEvents(); |
| 40 | 40 |
| 41 // Request to warp the cursor to a location within an AccelerateWidget. | 41 // Request to warp the cursor to a location within an AccelerateWidget. |
| 42 // If the cursor actually moves, the implementation must dispatch a mouse | 42 // If the cursor actually moves, the implementation must dispatch a mouse |
| 43 // move event with the new location. | 43 // move event with the new location. |
| 44 virtual void WarpCursorTo(gfx::AcceleratedWidget widget, | 44 virtual void WarpCursorTo(gfx::AcceleratedWidget widget, |
| 45 const gfx::PointF& location); | 45 const gfx::PointF& location); |
| 46 | 46 |
| 47 // Returns the static instance last set using SetInstance(). | 47 // Returns the singleton instance. |
| 48 static EventFactoryOzone* GetInstance(); | 48 static EventFactoryOzone* GetInstance(); |
| 49 | 49 |
| 50 // Sets the implementation delegate. Ownership is retained by the caller. | |
| 51 static void SetInstance(EventFactoryOzone*); | |
| 52 | |
| 53 private: | 50 private: |
| 54 static EventFactoryOzone* impl_; // not owned | 51 static EventFactoryOzone* impl_; // not owned |
| 55 | 52 |
| 56 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone); | 53 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone); |
| 57 }; | 54 }; |
| 58 | 55 |
| 59 } // namespace ui | 56 } // namespace ui |
| 60 | 57 |
| 61 #endif // UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ | 58 #endif // UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ |
| OLD | NEW |