| 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_LIBEVENT_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_LIBEVENT_H_ |
| 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_LIBEVENT_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_LIBEVENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 bool WatchFileDescriptor(int fd, | 115 bool WatchFileDescriptor(int fd, |
| 116 bool persistent, | 116 bool persistent, |
| 117 int mode, | 117 int mode, |
| 118 FileDescriptorWatcher *controller, | 118 FileDescriptorWatcher *controller, |
| 119 Watcher *delegate); | 119 Watcher *delegate); |
| 120 | 120 |
| 121 void AddIOObserver(IOObserver* obs); | 121 void AddIOObserver(IOObserver* obs); |
| 122 void RemoveIOObserver(IOObserver* obs); | 122 void RemoveIOObserver(IOObserver* obs); |
| 123 | 123 |
| 124 // MessagePump methods: | 124 // MessagePump methods: |
| 125 virtual void Run(Delegate* delegate) OVERRIDE; | 125 virtual void Run(Delegate* delegate) override; |
| 126 virtual void Quit() OVERRIDE; | 126 virtual void Quit() override; |
| 127 virtual void ScheduleWork() OVERRIDE; | 127 virtual void ScheduleWork() override; |
| 128 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; | 128 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override; |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 friend class MessagePumpLibeventTest; | 131 friend class MessagePumpLibeventTest; |
| 132 | 132 |
| 133 void WillProcessIOEvent(); | 133 void WillProcessIOEvent(); |
| 134 void DidProcessIOEvent(); | 134 void DidProcessIOEvent(); |
| 135 | 135 |
| 136 // Risky part of constructor. Returns true on success. | 136 // Risky part of constructor. Returns true on success. |
| 137 bool Init(); | 137 bool Init(); |
| 138 | 138 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 168 event* wakeup_event_; | 168 event* wakeup_event_; |
| 169 | 169 |
| 170 ObserverList<IOObserver> io_observers_; | 170 ObserverList<IOObserver> io_observers_; |
| 171 ThreadChecker watch_file_descriptor_caller_checker_; | 171 ThreadChecker watch_file_descriptor_caller_checker_; |
| 172 DISALLOW_COPY_AND_ASSIGN(MessagePumpLibevent); | 172 DISALLOW_COPY_AND_ASSIGN(MessagePumpLibevent); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace base | 175 } // namespace base |
| 176 | 176 |
| 177 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_LIBEVENT_H_ | 177 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_LIBEVENT_H_ |
| OLD | NEW |