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

Side by Side Diff: webrtc/base/messagehandler.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 | « webrtc/base/maccocoasocketserver.h ('k') | webrtc/base/messagequeue.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 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 11 matching lines...) Expand all
22 22
23 class MessageHandler { 23 class MessageHandler {
24 public: 24 public:
25 virtual ~MessageHandler(); 25 virtual ~MessageHandler();
26 virtual void OnMessage(Message* msg) = 0; 26 virtual void OnMessage(Message* msg) = 0;
27 27
28 protected: 28 protected:
29 MessageHandler() {} 29 MessageHandler() {}
30 30
31 private: 31 private:
32 DISALLOW_COPY_AND_ASSIGN(MessageHandler); 32 RTC_DISALLOW_COPY_AND_ASSIGN(MessageHandler);
33 }; 33 };
34 34
35 // Helper class to facilitate executing a functor on a thread. 35 // Helper class to facilitate executing a functor on a thread.
36 template <class ReturnT, class FunctorT> 36 template <class ReturnT, class FunctorT>
37 class FunctorMessageHandler : public MessageHandler { 37 class FunctorMessageHandler : public MessageHandler {
38 public: 38 public:
39 explicit FunctorMessageHandler(const FunctorT& functor) 39 explicit FunctorMessageHandler(const FunctorT& functor)
40 : functor_(functor) {} 40 : functor_(functor) {}
41 virtual void OnMessage(Message* msg) { 41 virtual void OnMessage(Message* msg) {
42 result_ = functor_(); 42 result_ = functor_();
(...skipping 30 matching lines...) Expand all
73 } 73 }
74 void result() const {} 74 void result() const {}
75 75
76 private: 76 private:
77 FunctorT functor_; 77 FunctorT functor_;
78 }; 78 };
79 79
80 } // namespace rtc 80 } // namespace rtc
81 81
82 #endif // WEBRTC_BASE_MESSAGEHANDLER_H_ 82 #endif // WEBRTC_BASE_MESSAGEHANDLER_H_
OLDNEW
« no previous file with comments | « webrtc/base/maccocoasocketserver.h ('k') | webrtc/base/messagequeue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698