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

Side by Side Diff: webrtc/base/asyncinvoker.h

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 years, 3 months 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
« no previous file with comments | « talk/session/media/srtpfilter_unittest.cc ('k') | webrtc/base/asyncpacketsocket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 private: 134 private:
135 void OnMessage(Message* msg) override; 135 void OnMessage(Message* msg) override;
136 void DoInvoke(Thread* thread, const scoped_refptr<AsyncClosure>& closure, 136 void DoInvoke(Thread* thread, const scoped_refptr<AsyncClosure>& closure,
137 uint32 id); 137 uint32 id);
138 void DoInvokeDelayed(Thread* thread, 138 void DoInvokeDelayed(Thread* thread,
139 const scoped_refptr<AsyncClosure>& closure, 139 const scoped_refptr<AsyncClosure>& closure,
140 uint32 delay_ms, 140 uint32 delay_ms,
141 uint32 id); 141 uint32 id);
142 bool destroying_; 142 bool destroying_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(AsyncInvoker); 144 RTC_DISALLOW_COPY_AND_ASSIGN(AsyncInvoker);
145 }; 145 };
146 146
147 // Similar to AsyncInvoker, but guards against the Thread being destroyed while 147 // Similar to AsyncInvoker, but guards against the Thread being destroyed while
148 // there are outstanding dangling pointers to it. It will connect to the current 148 // there are outstanding dangling pointers to it. It will connect to the current
149 // thread in the constructor, and will get notified when that thread is 149 // thread in the constructor, and will get notified when that thread is
150 // destroyed. After GuardedAsyncInvoker is constructed, it can be used from 150 // destroyed. After GuardedAsyncInvoker is constructed, it can be used from
151 // other threads to post functors to the thread it was constructed on. If that 151 // other threads to post functors to the thread it was constructed on. If that
152 // thread dies, any further calls to AsyncInvoke() will be safely ignored. 152 // thread dies, any further calls to AsyncInvoke() will be safely ignored.
153 class GuardedAsyncInvoker : public sigslot::has_slots<> { 153 class GuardedAsyncInvoker : public sigslot::has_slots<> {
154 public: 154 public:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 void ThreadDestroyed(); 221 void ThreadDestroyed();
222 222
223 CriticalSection crit_; 223 CriticalSection crit_;
224 Thread* thread_ GUARDED_BY(crit_); 224 Thread* thread_ GUARDED_BY(crit_);
225 AsyncInvoker invoker_ GUARDED_BY(crit_); 225 AsyncInvoker invoker_ GUARDED_BY(crit_);
226 }; 226 };
227 227
228 } // namespace rtc 228 } // namespace rtc
229 229
230 #endif // WEBRTC_BASE_ASYNCINVOKER_H_ 230 #endif // WEBRTC_BASE_ASYNCINVOKER_H_
OLDNEW
« no previous file with comments | « talk/session/media/srtpfilter_unittest.cc ('k') | webrtc/base/asyncpacketsocket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698