| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_IO_IOS_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_IO_IOS_H_ |
| 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_IO_IOS_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_IO_IOS_H_ |
| 7 | 7 |
| 8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
| 9 #include "base/mac/scoped_cffiledescriptorref.h" | 9 #include "base/mac/scoped_cffiledescriptorref.h" |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 DISALLOW_COPY_AND_ASSIGN(FileDescriptorWatcher); | 90 DISALLOW_COPY_AND_ASSIGN(FileDescriptorWatcher); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 enum Mode { | 93 enum Mode { |
| 94 WATCH_READ = 1 << 0, | 94 WATCH_READ = 1 << 0, |
| 95 WATCH_WRITE = 1 << 1, | 95 WATCH_WRITE = 1 << 1, |
| 96 WATCH_READ_WRITE = WATCH_READ | WATCH_WRITE | 96 WATCH_READ_WRITE = WATCH_READ | WATCH_WRITE |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 MessagePumpIOSForIO(); | 99 MessagePumpIOSForIO(); |
| 100 virtual ~MessagePumpIOSForIO(); | 100 ~MessagePumpIOSForIO() override; |
| 101 | 101 |
| 102 // Have the current thread's message loop watch for a a situation in which | 102 // Have the current thread's message loop watch for a a situation in which |
| 103 // reading/writing to the FD can be performed without blocking. | 103 // reading/writing to the FD can be performed without blocking. |
| 104 // Callers must provide a preallocated FileDescriptorWatcher object which | 104 // Callers must provide a preallocated FileDescriptorWatcher object which |
| 105 // can later be used to manage the lifetime of this event. | 105 // can later be used to manage the lifetime of this event. |
| 106 // If a FileDescriptorWatcher is passed in which is already attached to | 106 // If a FileDescriptorWatcher is passed in which is already attached to |
| 107 // an event, then the effect is cumulative i.e. after the call |controller| | 107 // an event, then the effect is cumulative i.e. after the call |controller| |
| 108 // will watch both the previous event and the new one. | 108 // will watch both the previous event and the new one. |
| 109 // If an error occurs while calling this method in a cumulative fashion, the | 109 // If an error occurs while calling this method in a cumulative fashion, the |
| 110 // event previously attached to |controller| is aborted. | 110 // event previously attached to |controller| is aborted. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 135 ThreadChecker watch_file_descriptor_caller_checker_; | 135 ThreadChecker watch_file_descriptor_caller_checker_; |
| 136 | 136 |
| 137 base::WeakPtrFactory<MessagePumpIOSForIO> weak_factory_; | 137 base::WeakPtrFactory<MessagePumpIOSForIO> weak_factory_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(MessagePumpIOSForIO); | 139 DISALLOW_COPY_AND_ASSIGN(MessagePumpIOSForIO); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace base | 142 } // namespace base |
| 143 | 143 |
| 144 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_IO_IOS_H_ | 144 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_IO_IOS_H_ |
| OLD | NEW |