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

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

Issue 1610243002: Move talk/app/webrtc to webrtc/api (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated location for peerconnection_unittests.isolate Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
3 * Copyright 2013 Google Inc.
4 * 3 *
5 * Redistribution and use in source and binary forms, with or without 4 * Use of this source code is governed by a BSD-style license
6 * modification, are permitted provided that the following conditions are met: 5 * that can be found in the LICENSE file in the root of the source
7 * 6 * tree. An additional intellectual property rights grant can be found
8 * 1. Redistributions of source code must retain the above copyright notice, 7 * in the file PATENTS. All contributing project authors may
9 * this list of conditions and the following disclaimer. 8 * be found in the AUTHORS file in the root of the source tree.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 9 */
27 10
28 // This file contains Macros for creating proxies for webrtc MediaStream and 11 // This file contains Macros for creating proxies for webrtc MediaStream and
29 // PeerConnection classes. 12 // PeerConnection classes.
30 13
31 // 14 //
32 // Example usage: 15 // Example usage:
33 // 16 //
34 // class TestInterface : public rtc::RefCountInterface { 17 // class TestInterface : public rtc::RefCountInterface {
35 // public: 18 // public:
36 // std::string FooA() = 0; 19 // std::string FooA() = 0;
37 // std::string FooB(bool arg1) const = 0; 20 // std::string FooB(bool arg1) const = 0;
38 // std::string FooC(bool arg1)= 0; 21 // std::string FooC(bool arg1)= 0;
39 // }; 22 // };
40 // 23 //
41 // Note that return types can not be a const reference. 24 // Note that return types can not be a const reference.
42 // 25 //
43 // class Test : public TestInterface { 26 // class Test : public TestInterface {
44 // ... implementation of the interface. 27 // ... implementation of the interface.
45 // }; 28 // };
46 // 29 //
47 // BEGIN_PROXY_MAP(Test) 30 // BEGIN_PROXY_MAP(Test)
48 // PROXY_METHOD0(std::string, FooA) 31 // PROXY_METHOD0(std::string, FooA)
49 // PROXY_CONSTMETHOD1(std::string, FooB, arg1) 32 // PROXY_CONSTMETHOD1(std::string, FooB, arg1)
50 // PROXY_METHOD1(std::string, FooC, arg1) 33 // PROXY_METHOD1(std::string, FooC, arg1)
51 // END_PROXY() 34 // END_PROXY()
52 // 35 //
53 // The proxy can be created using TestProxy::Create(Thread*, TestInterface*). 36 // The proxy can be created using TestProxy::Create(Thread*, TestInterface*).
54 37
55 #ifndef TALK_APP_WEBRTC_PROXY_H_ 38 #ifndef WEBRTC_API_PROXY_H_
56 #define TALK_APP_WEBRTC_PROXY_H_ 39 #define WEBRTC_API_PROXY_H_
57 40
58 #include "webrtc/base/event.h" 41 #include "webrtc/base/event.h"
59 #include "webrtc/base/thread.h" 42 #include "webrtc/base/thread.h"
60 43
61 namespace webrtc { 44 namespace webrtc {
62 45
63 template <typename R> 46 template <typename R>
64 class ReturnType { 47 class ReturnType {
65 public: 48 public:
66 template<typename C, typename M> 49 template<typename C, typename M>
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 private:\ 364 private:\
382 void Release_s() {\ 365 void Release_s() {\
383 c_ = NULL;\ 366 c_ = NULL;\
384 }\ 367 }\
385 mutable rtc::Thread* owner_thread_;\ 368 mutable rtc::Thread* owner_thread_;\
386 rtc::scoped_refptr<C> c_;\ 369 rtc::scoped_refptr<C> c_;\
387 };\ 370 };\
388 371
389 } // namespace webrtc 372 } // namespace webrtc
390 373
391 #endif // TALK_APP_WEBRTC_PROXY_H_ 374 #endif // WEBRTC_API_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698