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

Side by Side Diff: ui/events/ozone/event_factory_ozone.h

Issue 205433005: ozone: Add OzoneWindowFactory & OzoneWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 #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
37 // No events processing should happen until this is called. All processes have 37 // No events processing should happen until this is called. All processes have
38 // an EventFactoryOzone but not all of them should process events. In chrome, 38 // an EventFactoryOzone but not all of them should process events. In chrome,
39 // events are dispatched in the browser process on the UI thread. 39 // events are dispatched in the browser process on the UI thread.
40 virtual void StartProcessingEvents(); 40 virtual void StartProcessingEvents();
41 41
42 // Sets the TaskRunner to use for file I/O. The thread that calls 42 // Sets the TaskRunner to use for file I/O. The thread that calls
43 // StartProcessingEvents() should only be used for I/O that is critical 43 // StartProcessingEvents() should only be used for I/O that is critical
44 // to event dispatching. 44 // to event dispatching.
45 virtual void SetFileTaskRunner(scoped_refptr<base::TaskRunner> task_runner); 45 virtual void SetFileTaskRunner(scoped_refptr<base::TaskRunner> task_runner);
46 46
47 // Request to warp the cursor to a location within an AccelerateWidget.
48 // If the cursor actually moves, the implementation must dispatch a mouse
49 // move event with the new location.
50 virtual void WarpCursorTo(gfx::AcceleratedWidget widget,
51 const gfx::PointF& location);
52
53 // Returns the static instance last set using SetInstance(). 47 // Returns the static instance last set using SetInstance().
54 static EventFactoryOzone* GetInstance(); 48 static EventFactoryOzone* GetInstance();
55 49
56 // Sets the implementation delegate. Ownership is retained by the caller. 50 // Sets the implementation delegate. Ownership is retained by the caller.
57 static void SetInstance(EventFactoryOzone*); 51 static void SetInstance(EventFactoryOzone*);
58 52
59 // Subclasses should use this method to post a task that will dispatch 53 // Subclasses should use this method to post a task that will dispatch
60 // |event| from the UI message loop. This method takes ownership of 54 // |event| from the UI message loop. This method takes ownership of
61 // |event|. |event| will be deleted at the end of the posted task. 55 // |event|. |event| will be deleted at the end of the posted task.
62 static void DispatchEvent(scoped_ptr<ui::Event> event); 56 static void DispatchEvent(scoped_ptr<ui::Event> event);
63 57
64 private: 58 private:
65 static EventFactoryOzone* impl_; // not owned 59 static EventFactoryOzone* impl_; // not owned
66 60
67 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone); 61 DISALLOW_COPY_AND_ASSIGN(EventFactoryOzone);
68 }; 62 };
69 63
70 } // namespace ui 64 } // namespace ui
71 65
72 #endif // UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_ 66 #endif // UI_EVENTS_OZONE_EVENT_FACTORY_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698