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

Side by Side Diff: base/message_pump_linux.h

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

Powered by Google App Engine
This is Rietveld 408576698