| 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; |
| 65 | 66 |
| 66 protected: | 67 protected: |
| 67 virtual ~MessagePumpGlib(); | 68 virtual ~MessagePumpGlib(); |
| 68 | 69 |
| 69 // Returns the dispatcher for the current run state (|state_->dispatcher|). | 70 // Returns the dispatcher for the current run state (|state_->dispatcher|). |
| 70 MessagePumpDispatcher* GetDispatcher(); | 71 MessagePumpDispatcher* GetDispatcher(); |
| 71 | 72 |
| 72 ObserverList<MessagePumpObserver>& observers() { return observers_; } | 73 ObserverList<MessagePumpObserver>& observers() { return observers_; } |
| 73 | 74 |
| 74 private: | 75 private: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 101 | 102 |
| 102 // List of observers. | 103 // List of observers. |
| 103 ObserverList<MessagePumpObserver> observers_; | 104 ObserverList<MessagePumpObserver> observers_; |
| 104 | 105 |
| 105 DISALLOW_COPY_AND_ASSIGN(MessagePumpGlib); | 106 DISALLOW_COPY_AND_ASSIGN(MessagePumpGlib); |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace base | 109 } // namespace base |
| 109 | 110 |
| 110 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ | 111 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_GLIB_H_ |
| OLD | NEW |