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

Side by Side Diff: webrtc/api/proxy.h

Issue 2715103002: Replace NULL with nullptr or null in webrtc/api/. (Closed)
Patch Set: merge with master Created 3 years, 9 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 | « webrtc/api/peerconnectioninterface.h ('k') | webrtc/api/statstypes.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 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 class SynchronousMethodCall 121 class SynchronousMethodCall
122 : public rtc::MessageData, 122 : public rtc::MessageData,
123 public rtc::MessageHandler { 123 public rtc::MessageHandler {
124 public: 124 public:
125 explicit SynchronousMethodCall(rtc::MessageHandler* proxy) 125 explicit SynchronousMethodCall(rtc::MessageHandler* proxy)
126 : e_(), proxy_(proxy) {} 126 : e_(), proxy_(proxy) {}
127 ~SynchronousMethodCall() {} 127 ~SynchronousMethodCall() {}
128 128
129 void Invoke(const rtc::Location& posted_from, rtc::Thread* t) { 129 void Invoke(const rtc::Location& posted_from, rtc::Thread* t) {
130 if (t->IsCurrent()) { 130 if (t->IsCurrent()) {
131 proxy_->OnMessage(NULL); 131 proxy_->OnMessage(nullptr);
132 } else { 132 } else {
133 e_.reset(new rtc::Event(false, false)); 133 e_.reset(new rtc::Event(false, false));
134 t->Post(posted_from, this, 0); 134 t->Post(posted_from, this, 0);
135 e_->Wait(rtc::Event::kForever); 135 e_->Wait(rtc::Event::kForever);
136 } 136 }
137 } 137 }
138 138
139 private: 139 private:
140 void OnMessage(rtc::Message*) { proxy_->OnMessage(NULL); e_->Set(); } 140 void OnMessage(rtc::Message*) {
141 proxy_->OnMessage(nullptr);
142 e_->Set();
143 }
141 std::unique_ptr<rtc::Event> e_; 144 std::unique_ptr<rtc::Event> e_;
142 rtc::MessageHandler* proxy_; 145 rtc::MessageHandler* proxy_;
143 }; 146 };
144 147
145 } // namespace internal 148 } // namespace internal
146 149
147 template <typename C, typename R> 150 template <typename C, typename R>
148 class MethodCall0 : public rtc::Message, 151 class MethodCall0 : public rtc::Message,
149 public rtc::MessageHandler { 152 public rtc::MessageHandler {
150 public: 153 public:
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 #define PROXY_WORKER_CONSTMETHOD3(r, method, t1, t2) \ 573 #define PROXY_WORKER_CONSTMETHOD3(r, method, t1, t2) \
571 r method(t1 a1, t2 a2, t3 a3) const override { \ 574 r method(t1 a1, t2 a2, t3 a3) const override { \
572 ConstMethodCall3<C, r, t1, t2, t3> call(c_, &C::method, std::move(a1), \ 575 ConstMethodCall3<C, r, t1, t2, t3> call(c_, &C::method, std::move(a1), \
573 std::move(a2), std::move(a3)); \ 576 std::move(a2), std::move(a3)); \
574 return call.Marshal(RTC_FROM_HERE, worker_thread_); \ 577 return call.Marshal(RTC_FROM_HERE, worker_thread_); \
575 } 578 }
576 579
577 } // namespace webrtc 580 } // namespace webrtc
578 581
579 #endif // WEBRTC_API_PROXY_H_ 582 #endif // WEBRTC_API_PROXY_H_
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | webrtc/api/statstypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698