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

Side by Side Diff: chrome/browser/media/router/media_router_mojo_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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/media/router/media_router_mojo_impl.h" 5 #include "chrome/browser/media/router/media_router_mojo_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 void MediaRouterMojoImpl::SendRouteMessage( 237 void MediaRouterMojoImpl::SendRouteMessage(
238 const MediaRoute::Id& route_id, 238 const MediaRoute::Id& route_id,
239 const std::string& message, 239 const std::string& message,
240 const SendRouteMessageCallback& callback) { 240 const SendRouteMessageCallback& callback) {
241 DCHECK(thread_checker_.CalledOnValidThread()); 241 DCHECK(thread_checker_.CalledOnValidThread());
242 242
243 RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoSendSessionMessage, 243 RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoSendSessionMessage,
244 base::Unretained(this), route_id, message, callback)); 244 base::Unretained(this), route_id, message, callback));
245 } 245 }
246 246
247 void MediaRouterMojoImpl::SendRouteBinaryMessage(
248 const MediaRoute::Id& route_id,
249 const std::vector<uint8_t>& data,
250 const SendRouteMessageCallback& callback) {
251 // TODO(crbug.com/501539): To be Implemented.
252 NOTIMPLEMENTED();
haibinlu 2015/07/21 23:00:15 implement this since you add method to media_route
USE s.singapati at gmail.com 2015/07/22 16:09:51 Done.
253 }
254
247 void MediaRouterMojoImpl::ListenForRouteMessages( 255 void MediaRouterMojoImpl::ListenForRouteMessages(
248 const std::vector<MediaRoute::Id>& route_ids, 256 const std::vector<MediaRoute::Id>& route_ids,
249 const PresentationSessionMessageCallback& message_cb) { 257 const PresentationSessionMessageCallback& message_cb) {
250 DCHECK(thread_checker_.CalledOnValidThread()); 258 DCHECK(thread_checker_.CalledOnValidThread());
251 RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoListenForRouteMessages, 259 RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoListenForRouteMessages,
252 base::Unretained(this), route_ids, message_cb)); 260 base::Unretained(this), route_ids, message_cb));
253 } 261 }
254 262
255 void MediaRouterMojoImpl::ClearIssue(const Issue::Id& issue_id) { 263 void MediaRouterMojoImpl::ClearIssue(const Issue::Id& issue_id) {
256 DCHECK(thread_checker_.CalledOnValidThread()); 264 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return; 479 return;
472 } 480 }
473 481
474 for (const auto& next_request : pending_requests_) 482 for (const auto& next_request : pending_requests_)
475 next_request.Run(); 483 next_request.Run();
476 484
477 pending_requests_.clear(); 485 pending_requests_.clear();
478 } 486 }
479 487
480 } // namespace media_router 488 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_mojo_impl.h ('k') | chrome/browser/media/router/mock_media_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698