Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Side by Side Diff: base/message_pump_libevent.h

Issue 11412101: Provide an iOS message pump for IO implementation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PUMP_LIBEVENT_H_ 5 #ifndef BASE_MESSAGE_PUMP_LIBEVENT_H_
6 #define BASE_MESSAGE_PUMP_LIBEVENT_H_ 6 #define BASE_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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // If a FileDescriptorWatcher is passed in which is already attached to 108 // If a FileDescriptorWatcher is passed in which is already attached to
109 // an event, then the effect is cumulative i.e. after the call |controller| 109 // an event, then the effect is cumulative i.e. after the call |controller|
110 // will watch both the previous event and the new one. 110 // will watch both the previous event and the new one.
111 // If an error occurs while calling this method in a cumulative fashion, the 111 // If an error occurs while calling this method in a cumulative fashion, the
112 // event previously attached to |controller| is aborted. 112 // event previously attached to |controller| is aborted.
113 // Returns true on success. 113 // Returns true on success.
114 // Must be called on the same thread the message_pump is running on. 114 // Must be called on the same thread the message_pump is running on.
115 // TODO(dkegel): switch to edge-triggered readiness notification 115 // TODO(dkegel): switch to edge-triggered readiness notification
116 bool WatchFileDescriptor(int fd, 116 bool WatchFileDescriptor(int fd,
117 bool persistent, 117 bool persistent,
118 Mode mode, 118 int mode,
119 FileDescriptorWatcher *controller, 119 FileDescriptorWatcher *controller,
120 Watcher *delegate); 120 Watcher *delegate);
121 121
122 void AddIOObserver(IOObserver* obs); 122 void AddIOObserver(IOObserver* obs);
123 void RemoveIOObserver(IOObserver* obs); 123 void RemoveIOObserver(IOObserver* obs);
124 124
125 // MessagePump methods: 125 // MessagePump methods:
126 virtual void Run(Delegate* delegate) OVERRIDE; 126 virtual void Run(Delegate* delegate) OVERRIDE;
127 virtual void Quit() OVERRIDE; 127 virtual void Quit() OVERRIDE;
128 virtual void ScheduleWork() OVERRIDE; 128 virtual void ScheduleWork() OVERRIDE;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 event* wakeup_event_; 172 event* wakeup_event_;
173 173
174 ObserverList<IOObserver> io_observers_; 174 ObserverList<IOObserver> io_observers_;
175 ThreadChecker watch_file_descriptor_caller_checker_; 175 ThreadChecker watch_file_descriptor_caller_checker_;
176 DISALLOW_COPY_AND_ASSIGN(MessagePumpLibevent); 176 DISALLOW_COPY_AND_ASSIGN(MessagePumpLibevent);
177 }; 177 };
178 178
179 } // namespace base 179 } // namespace base
180 180
181 #endif // BASE_MESSAGE_PUMP_LIBEVENT_H_ 181 #endif // BASE_MESSAGE_PUMP_LIBEVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698