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

Unified Diff: chrome/browser/media/router/media_router.h

Issue 1177073003: [MediaRouter] Update MR-2-Extension's PostMessage to return boolean. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses Mark's comments Created 5 years, 6 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
Index: chrome/browser/media/router/media_router.h
diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h
index 0699d3f86bf8c26371cc08a93a19e59f515572da..a35a558a8bc2b426cc5e2737cd54009e12e8db0b 100644
--- a/chrome/browser/media/router/media_router.h
+++ b/chrome/browser/media/router/media_router.h
@@ -29,6 +29,8 @@ class MediaSinksObserver;
using MediaRouteResponseCallback =
base::Callback<void(scoped_ptr<MediaRoute>, const std::string&)>;
+using SendMessageCallback = base::Callback<void(bool sent)>;
Kevin M 2015/06/11 22:45:24 Make this a child of MediaRouter
haibinlu 2015/06/11 23:05:22 Done.
+
// An interface for handling resources related to media routing.
// Responsible for registering observers for receiving sink availability
// updates, handling route requests/responses, and operating on routes (e.g.
@@ -49,8 +51,9 @@ class MediaRouter {
// Posts |message| to a MediaSink connected via MediaRoute with |route_id|.
// TODO(imcheng): Support additional data types: Blob, ArrayBuffer,
// ArrayBufferView.
- virtual void PostMessage(const MediaRoute::Id& route_id,
- const std::string& message) = 0;
+ virtual void SendMessage(const MediaRoute::Id& route_id,
+ const std::string& message,
+ const SendMessageCallback& callback) = 0;
// Clears the issue with the id |issue_id|.
virtual void ClearIssue(const Issue::Id& issue_id) = 0;
« no previous file with comments | « no previous file | chrome/browser/media/router/media_router.mojom » ('j') | chrome/browser/media/router/media_router.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698