OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOOP_MESSAGE_PUMP_GLIB_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ |
6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_pump.h" | 10 #include "base/message_loop/message_pump.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Removes an Observer. It is safe to call this method while an Observer is | 56 // Removes an Observer. It is safe to call this method while an Observer is |
57 // receiving a notification callback. | 57 // receiving a notification callback. |
58 void RemoveObserver(MessagePumpObserver* observer); | 58 void RemoveObserver(MessagePumpObserver* observer); |
59 | 59 |
60 // Overridden from MessagePump: | 60 // Overridden from MessagePump: |
61 virtual void Run(Delegate* delegate) OVERRIDE; | 61 virtual void Run(Delegate* delegate) OVERRIDE; |
62 virtual void Quit() OVERRIDE; | 62 virtual void Quit() OVERRIDE; |
63 virtual void ScheduleWork() OVERRIDE; | 63 virtual void ScheduleWork() OVERRIDE; |
64 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; | 64 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; |
65 virtual void Shutdown() OVERRIDE; | |
66 | 65 |
67 protected: | 66 protected: |
68 virtual ~MessagePumpGlib(); | 67 virtual ~MessagePumpGlib(); |
69 | 68 |
70 // Returns the dispatcher for the current run state (|state_->dispatcher|). | 69 // Returns the dispatcher for the current run state (|state_->dispatcher|). |
71 MessagePumpDispatcher* GetDispatcher(); | 70 MessagePumpDispatcher* GetDispatcher(); |
72 | 71 |
73 ObserverList<MessagePumpObserver>& observers() { return observers_; } | 72 ObserverList<MessagePumpObserver>& observers() { return observers_; } |
74 | 73 |
75 private: | 74 private: |
(...skipping 26 matching lines...) Expand all Loading... |
102 | 101 |
103 // List of observers. | 102 // List of observers. |
104 ObserverList<MessagePumpObserver> observers_; | 103 ObserverList<MessagePumpObserver> observers_; |
105 | 104 |
106 DISALLOW_COPY_AND_ASSIGN(MessagePumpGlib); | 105 DISALLOW_COPY_AND_ASSIGN(MessagePumpGlib); |
107 }; | 106 }; |
108 | 107 |
109 } // namespace base | 108 } // namespace base |
110 | 109 |
111 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ | 110 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ |
OLD | NEW |