| 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" |
| 11 #include "base/containers/scoped_ptr_hash_map.h" | 11 #include "base/containers/scoped_ptr_hash_map.h" |
| 12 #include "base/id_map.h" | 12 #include "base/id_map.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "chrome/browser/media/router/media_router.h" | 15 #include "chrome/browser/media/router/media_router.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 class BrowserContext; | 18 class BrowserContext; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace media_router { | 21 namespace media_router { |
| 22 | 22 |
| 23 // A stub implementation of MediaRouter interface on Android. | 23 // A stub implementation of MediaRouter interface on Android. |
| 24 class MediaRouterAndroid : public MediaRouter { | 24 class MediaRouterAndroid : public MediaRouter { |
| 25 public: | 25 public: |
| 26 ~MediaRouterAndroid() override; | 26 ~MediaRouterAndroid() override; |
| 27 | 27 |
| 28 static bool Register(JNIEnv* env); | 28 static bool Register(JNIEnv* env); |
| 29 | 29 |
| 30 const MediaRoute* FindRouteBySource(const MediaSource::Id& source_id) const; |
| 31 |
| 30 // MediaRouter implementation. | 32 // MediaRouter implementation. |
| 31 void CreateRoute( | 33 void CreateRoute( |
| 32 const MediaSource::Id& source_id, | 34 const MediaSource::Id& source_id, |
| 33 const MediaSink::Id& sink_id, | 35 const MediaSink::Id& sink_id, |
| 34 const GURL& origin, | 36 const GURL& origin, |
| 35 content::WebContents* web_contents, | 37 content::WebContents* web_contents, |
| 36 const std::vector<MediaRouteResponseCallback>& callbacks) override; | 38 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
| 37 void JoinRoute( | 39 void JoinRoute( |
| 38 const MediaSource::Id& source, | 40 const MediaSource::Id& source, |
| 39 const std::string& presentation_id, | 41 const std::string& presentation_id, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 MediaRoute::Id, | 149 MediaRoute::Id, |
| 148 scoped_ptr<base::ObserverList<PresentationSessionMessagesObserver>>>; | 150 scoped_ptr<base::ObserverList<PresentationSessionMessagesObserver>>>; |
| 149 MessagesObservers messages_observers_; | 151 MessagesObservers messages_observers_; |
| 150 | 152 |
| 151 DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid); | 153 DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid); |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace media_router | 156 } // namespace media_router |
| 155 | 157 |
| 156 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ | 158 #endif // CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ |
| OLD | NEW |