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

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

Issue 2558963003: Add GetCurrentRoutes() to MediaRouter API, ensure dialog has routes at init (Closed)
Patch Set: Created 4 years 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // caller destroys the Subscription object. 176 // caller destroys the Subscription object.
177 virtual std::unique_ptr<PresentationConnectionStateSubscription> 177 virtual std::unique_ptr<PresentationConnectionStateSubscription>
178 AddPresentationConnectionStateChangedCallback( 178 AddPresentationConnectionStateChangedCallback(
179 const MediaRoute::Id& route_id, 179 const MediaRoute::Id& route_id,
180 const content::PresentationConnectionStateChangedCallback& callback) = 0; 180 const content::PresentationConnectionStateChangedCallback& callback) = 0;
181 181
182 // Called when the incognito profile for this instance is being shut down. 182 // Called when the incognito profile for this instance is being shut down.
183 // This will terminate all incognito media routes. 183 // This will terminate all incognito media routes.
184 virtual void OnIncognitoProfileShutdown() = 0; 184 virtual void OnIncognitoProfileShutdown() = 0;
185 185
186 // Returns the media routes that currently exist. To get notified whenever
187 // there is a change to the media routes, subclass MediaRoutesObserver.
188 virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0;
189
186 private: 190 private:
187 friend class IssuesObserver; 191 friend class IssuesObserver;
188 friend class MediaSinksObserver; 192 friend class MediaSinksObserver;
189 friend class MediaRoutesObserver; 193 friend class MediaRoutesObserver;
190 friend class PresentationConnectionStateObserver; 194 friend class PresentationConnectionStateObserver;
191 friend class RouteMessageObserver; 195 friend class RouteMessageObserver;
192 196
193 // The following functions are called by friend Observer classes above. 197 // The following functions are called by friend Observer classes above.
194 198
195 // Registers |observer| with this MediaRouter. |observer| specifies a media 199 // Registers |observer| with this MediaRouter. |observer| specifies a media
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 243
240 // Unregisters a previously registered RouteMessagesObserver. |observer| will 244 // Unregisters a previously registered RouteMessagesObserver. |observer| will
241 // stop receiving further updates. 245 // stop receiving further updates.
242 virtual void UnregisterRouteMessageObserver( 246 virtual void UnregisterRouteMessageObserver(
243 RouteMessageObserver* observer) = 0; 247 RouteMessageObserver* observer) = 0;
244 }; 248 };
245 249
246 } // namespace media_router 250 } // namespace media_router
247 251
248 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 252 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698