OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ | 5 #ifndef MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_ |
6 #define MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ | 6 #define MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_pump.h" | 12 #include "base/message_loop/message_pump.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "mojo/common/mojo_common_export.h" | |
17 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" | 16 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" |
18 | 17 |
19 namespace mojo { | 18 namespace mojo { |
20 namespace common { | 19 namespace common { |
21 | 20 |
22 class MessagePumpMojoHandler; | 21 class MessagePumpMojoHandler; |
23 | 22 |
24 // Mojo implementation of MessagePump. | 23 // Mojo implementation of MessagePump. |
25 class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump { | 24 class MessagePumpMojo : public base::MessagePump { |
26 public: | 25 public: |
27 class Observer { | 26 class Observer { |
28 public: | 27 public: |
29 Observer() {} | 28 Observer() {} |
30 | 29 |
31 virtual void WillSignalHandler() = 0; | 30 virtual void WillSignalHandler() = 0; |
32 virtual void DidSignalHandler() = 0; | 31 virtual void DidSignalHandler() = 0; |
33 | 32 |
34 protected: | 33 protected: |
35 virtual ~Observer() {} | 34 virtual ~Observer() {} |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 int next_handler_id_; | 125 int next_handler_id_; |
127 | 126 |
128 base::ObserverList<Observer> observers_; | 127 base::ObserverList<Observer> observers_; |
129 | 128 |
130 DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo); | 129 DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo); |
131 }; | 130 }; |
132 | 131 |
133 } // namespace common | 132 } // namespace common |
134 } // namespace mojo | 133 } // namespace mojo |
135 | 134 |
136 #endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ | 135 #endif // MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_ |
OLD | NEW |