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

Unified Diff: chrome/browser/media/router/presentation_service_delegate_impl.cc

Issue 1245213002: [MediaRouter] Implement send binary message from PSDImpl to MRPManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated UT to verify the |data| Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/media/router/mock_media_router.h ('k') | chrome/browser/media/router/test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/presentation_service_delegate_impl.cc
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc
index 5e79b8e0f5775176cb8ed30136f8c3a255261ad5..961bacb6660f31d26ea9d4d1dda6d2d14d4b539a 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -636,11 +636,6 @@ void PresentationServiceDelegateImpl::SendMessage(
int render_frame_id,
scoped_ptr<content::PresentationSessionMessage> message_request,
const SendMessageCallback& send_message_cb) {
- if (message_request->is_binary()) {
- NOTIMPLEMENTED();
- send_message_cb.Run(false);
- return;
- }
const MediaRoute::Id& route_id = frame_manager_->GetRouteId(
RenderFrameHostId(render_process_id, render_frame_id),
message_request->presentation_id);
@@ -649,8 +644,14 @@ void PresentationServiceDelegateImpl::SendMessage(
send_message_cb.Run(false);
return;
}
- router_->SendRouteMessage(route_id, *(message_request->message),
- send_message_cb);
+
+ if (message_request->is_binary()) {
+ router_->SendRouteBinaryMessage(route_id, message_request->data.Pass(),
+ send_message_cb);
+ } else {
+ router_->SendRouteMessage(route_id, *(message_request->message),
+ send_message_cb);
+ }
}
void PresentationServiceDelegateImpl::ListenForSessionStateChange(
« no previous file with comments | « chrome/browser/media/router/mock_media_router.h ('k') | chrome/browser/media/router/test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698