Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / renderer / media / cast_udp_transport.cc
index d27c4e7..a862e3f 100644 (file)
@@ -4,11 +4,14 @@
 
 #include "chrome/renderer/media/cast_udp_transport.h"
 
+#include "base/values.h"
 #include "chrome/renderer/media/cast_session.h"
 
 CastUdpTransport::CastUdpTransport(
     const scoped_refptr<CastSession>& session)
-    : cast_session_(session), weak_factory_(this) {
+    : cast_session_(session),
+      options_(new base::DictionaryValue),
+      weak_factory_(this) {
 }
 
 CastUdpTransport::~CastUdpTransport() {
@@ -18,5 +21,10 @@ void CastUdpTransport::SetDestination(const net::IPEndPoint& remote_address) {
   VLOG(1) << "CastUdpTransport::SetDestination = "
           << remote_address.ToString();
   remote_address_ = remote_address;
-  cast_session_->StartUDP(remote_address);
+  cast_session_->StartUDP(remote_address,
+                          make_scoped_ptr(options_->DeepCopy()));
+}
+
+void CastUdpTransport::SetOptions(scoped_ptr<base::DictionaryValue> options) {
+  options_.reset(options.release());
 }