| 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 // Native code that handle chrome.webrtc custom bindings. | 26 // Native code that handle chrome.webrtc custom bindings. |
| 27 class CastStreamingNativeHandler : public ObjectBackedNativeHandler { | 27 class CastStreamingNativeHandler : public ObjectBackedNativeHandler { |
| 28 public: | 28 public: |
| 29 explicit CastStreamingNativeHandler(ScriptContext* context); | 29 explicit CastStreamingNativeHandler(ScriptContext* context); |
| 30 virtual ~CastStreamingNativeHandler(); | 30 ~CastStreamingNativeHandler() override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 void CreateCastSession( | 33 void CreateCastSession( |
| 34 const v8::FunctionCallbackInfo<v8::Value>& args); | 34 const v8::FunctionCallbackInfo<v8::Value>& args); |
| 35 | 35 |
| 36 void DestroyCastRtpStream( | 36 void DestroyCastRtpStream( |
| 37 const v8::FunctionCallbackInfo<v8::Value>& args); | 37 const v8::FunctionCallbackInfo<v8::Value>& args); |
| 38 void CreateParamsCastRtpStream( | 38 void CreateParamsCastRtpStream( |
| 39 const v8::FunctionCallbackInfo<v8::Value>& args); | 39 const v8::FunctionCallbackInfo<v8::Value>& args); |
| 40 void GetSupportedParamsCastRtpStream( | 40 void GetSupportedParamsCastRtpStream( |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 RtpStreamCallbackMap get_stats_callbacks_; | 94 RtpStreamCallbackMap get_stats_callbacks_; |
| 95 | 95 |
| 96 base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_; | 96 base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); | 98 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace extensions | 101 } // namespace extensions |
| 102 | 102 |
| 103 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ | 103 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
| OLD | NEW |