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

Side by Side Diff: chrome/renderer/extensions/webrtc_native_handler.h

Issue 47303005: Implement native bindings for cast extensions API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_RENDERER_EXTENSIONS_WEBRTC_NATIVE_HANDLER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_WEBRTC_NATIVE_HANDLER_H_
6 #define CHROME_RENDERER_EXTENSIONS_WEBRTC_NATIVE_HANDLER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_WEBRTC_NATIVE_HANDLER_H_
7 7
8 #include <map>
9
10 #include "base/memory/linked_ptr.h"
8 #include "chrome/renderer/extensions/object_backed_native_handler.h" 11 #include "chrome/renderer/extensions/object_backed_native_handler.h"
9 #include "v8/include/v8.h" 12 #include "v8/include/v8.h"
10 13
14 class CastSendTransport;
15 class CastUdpTransport;
16
11 namespace extensions { 17 namespace extensions {
12 18
13 class ChromeV8Context; 19 class ChromeV8Context;
14 20
15 // Native code that handle chrome.webrtc custom bindings. 21 // Native code that handle chrome.webrtc custom bindings.
16 class WebRtcNativeHandler : public ObjectBackedNativeHandler { 22 class WebRtcNativeHandler : public ObjectBackedNativeHandler {
17 public: 23 public:
18 explicit WebRtcNativeHandler(ChromeV8Context* context); 24 explicit WebRtcNativeHandler(ChromeV8Context* context);
19 virtual ~WebRtcNativeHandler(); 25 virtual ~WebRtcNativeHandler();
20 26
(...skipping 13 matching lines...) Expand all
34 40
35 void CreateCastUdpTransport( 41 void CreateCastUdpTransport(
36 const v8::FunctionCallbackInfo<v8::Value>& args); 42 const v8::FunctionCallbackInfo<v8::Value>& args);
37 void DestroyCastUdpTransport( 43 void DestroyCastUdpTransport(
38 const v8::FunctionCallbackInfo<v8::Value>& args); 44 const v8::FunctionCallbackInfo<v8::Value>& args);
39 void StartCastUdpTransport( 45 void StartCastUdpTransport(
40 const v8::FunctionCallbackInfo<v8::Value>& args); 46 const v8::FunctionCallbackInfo<v8::Value>& args);
41 void StopCastUdpTransport( 47 void StopCastUdpTransport(
42 const v8::FunctionCallbackInfo<v8::Value>& args); 48 const v8::FunctionCallbackInfo<v8::Value>& args);
43 49
50 // Helper methods to get transport indexed by |transport_id|.
51 // If the transport is not found then return NULL.
not at google - send to devlin 2013/10/30 20:41:57 Comment: Gets the Send or UDP transport indexed by
Alpha Left Google 2013/10/30 23:58:26 Done.
52 CastSendTransport* GetSendTransport(int transport_id) const;
53 CastUdpTransport* GetUdpTransport(int transport_id) const;
54
55 int last_transport_id_;
56 typedef std::map<int, linked_ptr<CastSendTransport> > SendTransportMap;
57 SendTransportMap send_transport_map_;
58 typedef std::map<int, linked_ptr<CastUdpTransport> > UdpTransportMap;
59 UdpTransportMap udp_transport_map_;
not at google - send to devlin 2013/10/30 20:41:57 can you separate these with new lines? it's hard t
Alpha Left Google 2013/10/30 23:58:26 Done.
60
44 DISALLOW_COPY_AND_ASSIGN(WebRtcNativeHandler); 61 DISALLOW_COPY_AND_ASSIGN(WebRtcNativeHandler);
45 }; 62 };
46 63
47 } // namespace extensions 64 } // namespace extensions
48 65
49 #endif // CHROME_RENDERER_EXTENSIONS_WEBRTC_NATIVE_HANDLER_H_ 66 #endif // CHROME_RENDERER_EXTENSIONS_WEBRTC_NATIVE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698