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

Side by Side Diff: base/message_loop/message_pump_ozone.h

Issue 17078005: Move message_pump to base/message_loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « base/message_loop/message_pump_observer.h ('k') | base/message_loop/message_pump_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 BASE_MESSAGE_PUMP_OZONE_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_OZONE_H_
6 #define BASE_MESSAGE_PUMP_OZONE_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_OZONE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_pump_dispatcher.h" 10 #include "base/message_loop/message_pump_dispatcher.h"
11 #include "base/message_pump_libevent.h" 11 #include "base/message_loop/message_pump_libevent.h"
12 #include "base/message_pump_observer.h" 12 #include "base/message_loop/message_pump_observer.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 14
15 namespace base { 15 namespace base {
16 16
17 // This class implements a message-pump for processing events from input devices 17 // This class implements a message-pump for processing events from input devices
18 // Refer to MessagePump for further documentation. 18 // Refer to MessagePump for further documentation.
19 class BASE_EXPORT MessagePumpOzone : public MessagePumpLibevent, 19 class BASE_EXPORT MessagePumpOzone : public MessagePumpLibevent,
20 public MessagePumpDispatcher { 20 public MessagePumpDispatcher {
21 public: 21 public:
22 MessagePumpOzone(); 22 MessagePumpOzone();
23 23
24 // Returns the UI message pump. 24 // Returns the UI message pump.
25 static MessagePumpOzone* Current(); 25 static MessagePumpOzone* Current();
26 26
27 // Add/Remove the root window dispatcher. 27 // Add/Remove the root window dispatcher.
28 void AddDispatcherForRootWindow(MessagePumpDispatcher* dispatcher); 28 void AddDispatcherForRootWindow(MessagePumpDispatcher* dispatcher);
29 void RemoveDispatcherForRootWindow(MessagePumpDispatcher* dispatcher); 29 void RemoveDispatcherForRootWindow(MessagePumpDispatcher* dispatcher);
30 30
31 void RunWithDispatcher(Delegate* delegate, MessagePumpDispatcher* dispatcher); 31 void RunWithDispatcher(Delegate* delegate, MessagePumpDispatcher* dispatcher);
32 32
33 // Add / remove an Observer, which will start receiving notifications 33 // Add / remove an Observer, which will start receiving notifications
34 // immediately. 34 // immediately.
35 void AddObserver(MessagePumpObserver* observer); 35 void AddObserver(MessagePumpObserver* observer);
36 void RemoveObserver(MessagePumpObserver* observer); 36 void RemoveObserver(MessagePumpObserver* observer);
37 37
38 // Overridden from MessagePumpDispatcher. 38 // Overridden from MessagePumpDispatcher.
39 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; 39 virtual bool Dispatch(const NativeEvent& event) OVERRIDE;
40 40
41 private: 41 private:
42 virtual ~MessagePumpOzone(); 42 virtual ~MessagePumpOzone();
43 std::vector<MessagePumpDispatcher*> dispatcher_; 43 std::vector<MessagePumpDispatcher*> dispatcher_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(MessagePumpOzone); 45 DISALLOW_COPY_AND_ASSIGN(MessagePumpOzone);
46 }; 46 };
47 47
48 typedef MessagePumpOzone MessagePumpForUI; 48 typedef MessagePumpOzone MessagePumpForUI;
49 49
50 } // namespace base 50 } // namespace base
51 51
52 #endif // BASE_MESSAGE_PUMP_OZONE_H_ 52 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_OZONE_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_observer.h ('k') | base/message_loop/message_pump_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698