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

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

Issue 291473002: ozone: Initialize a subsystem only if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r270817 Created 6 years, 7 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
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/event_factory_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/event_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698