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

Side by Side Diff: chrome/renderer/media/cast_transport_sender_ipc.cc

Issue 551883004: Cast: Let the extension control if DSCP is on or off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/renderer/media/cast_transport_sender_ipc.h" 5 #include "chrome/renderer/media/cast_transport_sender_ipc.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "chrome/common/cast_messages.h" 9 #include "chrome/common/cast_messages.h"
10 #include "chrome/renderer/media/cast_ipc_dispatcher.h" 10 #include "chrome/renderer/media/cast_ipc_dispatcher.h"
11 #include "ipc/ipc_channel_proxy.h" 11 #include "ipc/ipc_channel_proxy.h"
12 #include "media/cast/cast_sender.h" 12 #include "media/cast/cast_sender.h"
13 13
14 CastTransportSenderIPC::ClientCallbacks::ClientCallbacks() {} 14 CastTransportSenderIPC::ClientCallbacks::ClientCallbacks() {}
15 CastTransportSenderIPC::ClientCallbacks::~ClientCallbacks() {} 15 CastTransportSenderIPC::ClientCallbacks::~ClientCallbacks() {}
16 16
17 CastTransportSenderIPC::CastTransportSenderIPC( 17 CastTransportSenderIPC::CastTransportSenderIPC(
18 const net::IPEndPoint& remote_end_point, 18 const net::IPEndPoint& remote_end_point,
19 const std::string& options,
19 const media::cast::CastTransportStatusCallback& status_cb, 20 const media::cast::CastTransportStatusCallback& status_cb,
20 const media::cast::BulkRawEventsCallback& raw_events_cb) 21 const media::cast::BulkRawEventsCallback& raw_events_cb)
21 : status_callback_(status_cb), raw_events_callback_(raw_events_cb) { 22 : status_callback_(status_cb), raw_events_callback_(raw_events_cb) {
22 if (CastIPCDispatcher::Get()) { 23 if (CastIPCDispatcher::Get()) {
23 channel_id_ = CastIPCDispatcher::Get()->AddSender(this); 24 channel_id_ = CastIPCDispatcher::Get()->AddSender(this);
24 } 25 }
25 Send(new CastHostMsg_New(channel_id_, remote_end_point)); 26 Send(new CastHostMsg_New(channel_id_, remote_end_point, options));
Alpha Left Google 2014/09/09 00:30:45 If |options| is base::DictionaryValue the serializ
hubbe 2014/09/09 20:10:01 Done.
26 } 27 }
27 28
28 CastTransportSenderIPC::~CastTransportSenderIPC() { 29 CastTransportSenderIPC::~CastTransportSenderIPC() {
29 Send(new CastHostMsg_Delete(channel_id_)); 30 Send(new CastHostMsg_Delete(channel_id_));
30 if (CastIPCDispatcher::Get()) { 31 if (CastIPCDispatcher::Get()) {
31 CastIPCDispatcher::Get()->RemoveSender(channel_id_); 32 CastIPCDispatcher::Get()->RemoveSender(channel_id_);
32 } 33 }
33 } 34 }
34 35
35 void CastTransportSenderIPC::InitializeAudio( 36 void CastTransportSenderIPC::InitializeAudio(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 it->second.cast_message_cb.Run(cast_message); 121 it->second.cast_message_cb.Run(cast_message);
121 } 122 }
122 123
123 void CastTransportSenderIPC::Send(IPC::Message* message) { 124 void CastTransportSenderIPC::Send(IPC::Message* message) {
124 if (CastIPCDispatcher::Get()) { 125 if (CastIPCDispatcher::Get()) {
125 CastIPCDispatcher::Get()->Send(message); 126 CastIPCDispatcher::Get()->Send(message);
126 } else { 127 } else {
127 delete message; 128 delete message;
128 } 129 }
129 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698