OLD | NEW |
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_CAST_STREAMING_NATIVE_HANDLER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "extensions/renderer/object_backed_native_handler.h" | 12 #include "extensions/renderer/object_backed_native_handler.h" |
13 #include "extensions/renderer/scoped_persistent.h" | 13 #include "extensions/renderer/scoped_persistent.h" |
14 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
15 | 15 |
16 class CastRtpStream; | 16 class CastRtpStream; |
17 class CastUdpTransport; | 17 class CastUdpTransport; |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class BinaryValue; | 20 class BinaryValue; |
21 class DictionaryValue; | 21 class DictionaryValue; |
22 } | 22 } |
23 | 23 |
24 namespace extensions { | 24 namespace extensions { |
25 | 25 |
26 class ChromeV8Context; | |
27 | |
28 // Native code that handle chrome.webrtc custom bindings. | 26 // Native code that handle chrome.webrtc custom bindings. |
29 class CastStreamingNativeHandler : public ObjectBackedNativeHandler { | 27 class CastStreamingNativeHandler : public ObjectBackedNativeHandler { |
30 public: | 28 public: |
31 explicit CastStreamingNativeHandler(ChromeV8Context* context); | 29 explicit CastStreamingNativeHandler(ScriptContext* context); |
32 virtual ~CastStreamingNativeHandler(); | 30 virtual ~CastStreamingNativeHandler(); |
33 | 31 |
34 private: | 32 private: |
35 void CreateCastSession( | 33 void CreateCastSession( |
36 const v8::FunctionCallbackInfo<v8::Value>& args); | 34 const v8::FunctionCallbackInfo<v8::Value>& args); |
37 | 35 |
38 void DestroyCastRtpStream( | 36 void DestroyCastRtpStream( |
39 const v8::FunctionCallbackInfo<v8::Value>& args); | 37 const v8::FunctionCallbackInfo<v8::Value>& args); |
40 void CreateParamsCastRtpStream( | 38 void CreateParamsCastRtpStream( |
41 const v8::FunctionCallbackInfo<v8::Value>& args); | 39 const v8::FunctionCallbackInfo<v8::Value>& args); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 RtpStreamCallbackMap; | 92 RtpStreamCallbackMap; |
95 RtpStreamCallbackMap get_raw_events_callbacks_; | 93 RtpStreamCallbackMap get_raw_events_callbacks_; |
96 RtpStreamCallbackMap get_stats_callbacks_; | 94 RtpStreamCallbackMap get_stats_callbacks_; |
97 | 95 |
98 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); | 96 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); |
99 }; | 97 }; |
100 | 98 |
101 } // namespace extensions | 99 } // namespace extensions |
102 | 100 |
103 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ | 101 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
OLD | NEW |