OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
| 7 |
| 8 #include "chrome/browser/media/router/media_router.h" |
| 9 |
| 10 namespace content { |
| 11 class BrowserContext; |
| 12 } |
| 13 |
| 14 namespace media_router { |
| 15 |
| 16 // A stub implementation of MediaRouter interface on Android. |
| 17 class MediaRouterAndroid : public MediaRouter { |
| 18 public: |
| 19 ~MediaRouterAndroid() override; |
| 20 |
| 21 // MediaRouter implementation. |
| 22 void CreateRoute( |
| 23 const MediaSource::Id& source_id, |
| 24 const MediaSink::Id& sink_id, |
| 25 const GURL& origin, |
| 26 int tab_id, |
| 27 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
| 28 void JoinRoute( |
| 29 const MediaSource::Id& source, |
| 30 const std::string& presentation_id, |
| 31 const GURL& origin, |
| 32 int tab_id, |
| 33 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
| 34 void CloseRoute(const MediaRoute::Id& route_id) override; |
| 35 void SendRouteMessage(const MediaRoute::Id& route_id, |
| 36 const std::string& message, |
| 37 const SendRouteMessageCallback& callback) override; |
| 38 void ListenForRouteMessages( |
| 39 const std::vector<MediaRoute::Id>& route_ids, |
| 40 const PresentationSessionMessageCallback& message_cb) override; |
| 41 void ClearIssue(const Issue::Id& issue_id) override; |
| 42 |
| 43 private: |
| 44 friend class MediaRouterFactory; |
| 45 |
| 46 explicit MediaRouterAndroid(content::BrowserContext*); |
| 47 |
| 48 // MediaRouter implementation. |
| 49 void RegisterMediaSinksObserver(MediaSinksObserver* observer) override; |
| 50 void UnregisterMediaSinksObserver(MediaSinksObserver* observer) override; |
| 51 void RegisterMediaRoutesObserver(MediaRoutesObserver* observer) override; |
| 52 void UnregisterMediaRoutesObserver(MediaRoutesObserver* observer) override; |
| 53 void RegisterIssuesObserver(IssuesObserver* observer) override; |
| 54 void UnregisterIssuesObserver(IssuesObserver* observer) override; |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid); |
| 57 }; |
| 58 |
| 59 } // namespace media_router |
| 60 |
| 61 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
OLD | NEW |