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

Side by Side Diff: chrome/browser/media/router/media_router.h

Issue 1245213002: [MediaRouter] Implement send binary message from PSDImpl to MRPManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fixes 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const MediaSource::Id& source, 75 const MediaSource::Id& source,
76 const std::string& presentation_id, 76 const std::string& presentation_id,
77 const GURL& origin, 77 const GURL& origin,
78 int tab_id, 78 int tab_id,
79 const std::vector<MediaRouteResponseCallback>& callbacks) = 0; 79 const std::vector<MediaRouteResponseCallback>& callbacks) = 0;
80 80
81 // Closes the media route specified by |route_id|. 81 // Closes the media route specified by |route_id|.
82 virtual void CloseRoute(const MediaRoute::Id& route_id) = 0; 82 virtual void CloseRoute(const MediaRoute::Id& route_id) = 0;
83 83
84 // Posts |message| to a MediaSink connected via MediaRoute with |route_id|. 84 // Posts |message| to a MediaSink connected via MediaRoute with |route_id|.
85 // TODO(imcheng): Support additional data types: Blob, ArrayBuffer,
86 // ArrayBufferView.
87 virtual void SendRouteMessage(const MediaRoute::Id& route_id, 85 virtual void SendRouteMessage(const MediaRoute::Id& route_id,
88 const std::string& message, 86 const std::string& message,
89 const SendRouteMessageCallback& callback) = 0; 87 const SendRouteMessageCallback& callback) = 0;
90 88
89 // Sends |data| to a MediaSink connected via MediaRoute with |route_id|.
90 // This supports additional data types: Blob, ArrayBuffer and ArrayBufferView.
haibinlu 2015/07/25 01:15:53 Is "This supports additional data types: Blob, Arr
91 virtual void SendRouteBinaryMessage(
92 const MediaRoute::Id& route_id,
93 const std::vector<uint8>& data,
94 const SendRouteMessageCallback& callback) = 0;
95
91 // Gets the next batch of messages from one of the routes in |route_ids|. 96 // Gets the next batch of messages from one of the routes in |route_ids|.
92 // |message_cb|: Invoked with a non-empty list of messages when there are 97 // |message_cb|: Invoked with a non-empty list of messages when there are
93 // messages, an empty list when messaging channel had error. 98 // messages, an empty list when messaging channel had error.
94 // It is not invoked until there are messages available or error. 99 // It is not invoked until there are messages available or error.
95 virtual void ListenForRouteMessages( 100 virtual void ListenForRouteMessages(
96 const std::vector<MediaRoute::Id>& route_ids, 101 const std::vector<MediaRoute::Id>& route_ids,
97 const PresentationSessionMessageCallback& message_cb) = 0; 102 const PresentationSessionMessageCallback& message_cb) = 0;
98 103
99 // Clears the issue with the id |issue_id|. 104 // Clears the issue with the id |issue_id|.
100 virtual void ClearIssue(const Issue::Id& issue_id) = 0; 105 virtual void ClearIssue(const Issue::Id& issue_id) = 0;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // in undefined behavior. 145 // in undefined behavior.
141 virtual void RegisterIssuesObserver(IssuesObserver* observer) = 0; 146 virtual void RegisterIssuesObserver(IssuesObserver* observer) = 0;
142 147
143 // Removes the IssuesObserver |observer|. 148 // Removes the IssuesObserver |observer|.
144 virtual void UnregisterIssuesObserver(IssuesObserver* observer) = 0; 149 virtual void UnregisterIssuesObserver(IssuesObserver* observer) = 0;
145 }; 150 };
146 151
147 } // namespace media_router 152 } // namespace media_router
148 153
149 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 154 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698