| OLD | NEW |
| 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_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ | 6 #define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const MediaSink::Id& sink_id, | 33 const MediaSink::Id& sink_id, |
| 34 const GURL& origin, | 34 const GURL& origin, |
| 35 content::WebContents* web_contents, | 35 content::WebContents* web_contents, |
| 36 const std::vector<MediaRouteResponseCallback>& callbacks) override; | 36 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
| 37 void JoinRoute( | 37 void JoinRoute( |
| 38 const MediaSource::Id& source, | 38 const MediaSource::Id& source, |
| 39 const std::string& presentation_id, | 39 const std::string& presentation_id, |
| 40 const GURL& origin, | 40 const GURL& origin, |
| 41 content::WebContents* web_contents, | 41 content::WebContents* web_contents, |
| 42 const std::vector<MediaRouteResponseCallback>& callbacks) override; | 42 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
| 43 void JoinRouteByRouteId( |
| 44 const MediaSource::Id& source, |
| 45 const MediaRoute::Id& route_id, |
| 46 const GURL& origin, |
| 47 content::WebContents* web_contents, |
| 48 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
| 43 void CloseRoute(const MediaRoute::Id& route_id) override; | 49 void CloseRoute(const MediaRoute::Id& route_id) override; |
| 44 void SendRouteMessage(const MediaRoute::Id& route_id, | 50 void SendRouteMessage(const MediaRoute::Id& route_id, |
| 45 const std::string& message, | 51 const std::string& message, |
| 46 const SendRouteMessageCallback& callback) override; | 52 const SendRouteMessageCallback& callback) override; |
| 47 void SendRouteBinaryMessage( | 53 void SendRouteBinaryMessage( |
| 48 const MediaRoute::Id& route_id, | 54 const MediaRoute::Id& route_id, |
| 49 scoped_ptr<std::vector<uint8>> data, | 55 scoped_ptr<std::vector<uint8>> data, |
| 50 const SendRouteMessageCallback& callback) override; | 56 const SendRouteMessageCallback& callback) override; |
| 51 void AddIssue(const Issue& issue) override; | 57 void AddIssue(const Issue& issue) override; |
| 52 void ClearIssue(const Issue::Id& issue_id) override; | 58 void ClearIssue(const Issue::Id& issue_id) override; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void UnregisterLocalMediaRoutesObserver( | 114 void UnregisterLocalMediaRoutesObserver( |
| 109 LocalMediaRoutesObserver* observer) override; | 115 LocalMediaRoutesObserver* observer) override; |
| 110 | 116 |
| 111 base::android::ScopedJavaGlobalRef<jobject> java_media_router_; | 117 base::android::ScopedJavaGlobalRef<jobject> java_media_router_; |
| 112 | 118 |
| 113 using MediaSinkObservers = base::ScopedPtrHashMap< | 119 using MediaSinkObservers = base::ScopedPtrHashMap< |
| 114 MediaSource::Id, | 120 MediaSource::Id, |
| 115 scoped_ptr<base::ObserverList<MediaSinksObserver>>>; | 121 scoped_ptr<base::ObserverList<MediaSinksObserver>>>; |
| 116 MediaSinkObservers sinks_observers_; | 122 MediaSinkObservers sinks_observers_; |
| 117 | 123 |
| 118 base::ObserverList<MediaRoutesObserver> routes_observers_; | 124 using MediaRouteObservers = base::ScopedPtrHashMap< |
| 125 MediaSource::Id, |
| 126 scoped_ptr<base::ObserverList<MediaRoutesObserver>>>; |
| 127 MediaRouteObservers routes_observers_; |
| 119 | 128 |
| 120 struct MediaRouteRequest { | 129 struct MediaRouteRequest { |
| 121 MediaRouteRequest( | 130 MediaRouteRequest( |
| 122 const MediaSource& source, | 131 const MediaSource& source, |
| 123 const std::string& presentation_id, | 132 const std::string& presentation_id, |
| 124 const std::vector<MediaRouteResponseCallback>& callbacks); | 133 const std::vector<MediaRouteResponseCallback>& callbacks); |
| 125 ~MediaRouteRequest(); | 134 ~MediaRouteRequest(); |
| 126 | 135 |
| 127 MediaSource media_source; | 136 MediaSource media_source; |
| 128 std::string presentation_id; | 137 std::string presentation_id; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 143 MediaRoute::Id, | 152 MediaRoute::Id, |
| 144 scoped_ptr<base::ObserverList<PresentationSessionMessagesObserver>>>; | 153 scoped_ptr<base::ObserverList<PresentationSessionMessagesObserver>>>; |
| 145 MessagesObservers messages_observers_; | 154 MessagesObservers messages_observers_; |
| 146 | 155 |
| 147 DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid); | 156 DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid); |
| 148 }; | 157 }; |
| 149 | 158 |
| 150 } // namespace media_router | 159 } // namespace media_router |
| 151 | 160 |
| 152 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ | 161 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
| OLD | NEW |