OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/containers/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "content/browser/media/media_web_contents_observer.h" | 14 #include "content/browser/media/media_web_contents_observer.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 | 16 |
| 17 namespace media { |
| 18 enum class MediaContentType; |
| 19 } // namespace media |
| 20 |
17 namespace content { | 21 namespace content { |
18 | 22 |
19 class BrowserCdmManager; | 23 class BrowserCdmManager; |
20 class BrowserMediaPlayerManager; | 24 class BrowserMediaPlayerManager; |
21 class BrowserMediaSessionManager; | 25 class BrowserMediaSessionManager; |
22 class BrowserSurfaceViewManager; | 26 class BrowserSurfaceViewManager; |
23 | 27 |
24 // This class adds Android specific extensions to the MediaWebContentsObserver. | 28 // This class adds Android specific extensions to the MediaWebContentsObserver. |
25 class CONTENT_EXPORT MediaWebContentsObserverAndroid | 29 class CONTENT_EXPORT MediaWebContentsObserverAndroid |
26 : public MediaWebContentsObserver { | 30 : public MediaWebContentsObserver { |
(...skipping 28 matching lines...) Expand all Loading... |
55 void SuspendAllMediaPlayers(); | 59 void SuspendAllMediaPlayers(); |
56 | 60 |
57 // Initiates a synchronous MediaSession request for browser side players. | 61 // Initiates a synchronous MediaSession request for browser side players. |
58 // | 62 // |
59 // TODO(dalecurtis): Delete this method once we're no longer using WMPA and | 63 // TODO(dalecurtis): Delete this method once we're no longer using WMPA and |
60 // the BrowserMediaPlayerManagers. Tracked by http://crbug.com/580626 | 64 // the BrowserMediaPlayerManagers. Tracked by http://crbug.com/580626 |
61 bool RequestPlay(RenderFrameHost* render_frame_host, | 65 bool RequestPlay(RenderFrameHost* render_frame_host, |
62 int delegate_id, | 66 int delegate_id, |
63 bool has_audio, | 67 bool has_audio, |
64 bool is_remote, | 68 bool is_remote, |
65 base::TimeDelta duration); | 69 media::MediaContentType media_content_type); |
66 | 70 |
67 void DisconnectMediaSession(RenderFrameHost* render_frame_host, | 71 void DisconnectMediaSession(RenderFrameHost* render_frame_host, |
68 int delegate_id); | 72 int delegate_id); |
69 | 73 |
70 #if defined(VIDEO_HOLE) | 74 #if defined(VIDEO_HOLE) |
71 void OnFrameInfoUpdated(); | 75 void OnFrameInfoUpdated(); |
72 #endif // defined(VIDEO_HOLE) | 76 #endif // defined(VIDEO_HOLE) |
73 | 77 |
74 // MediaWebContentsObserver overrides. | 78 // MediaWebContentsObserver overrides. |
75 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | 79 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 base::ScopedPtrHashMap<RenderFrameHost*, | 113 base::ScopedPtrHashMap<RenderFrameHost*, |
110 std::unique_ptr<BrowserSurfaceViewManager>>; | 114 std::unique_ptr<BrowserSurfaceViewManager>>; |
111 SurfaceViewManagerMap surface_view_managers_; | 115 SurfaceViewManagerMap surface_view_managers_; |
112 | 116 |
113 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); | 117 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); |
114 }; | 118 }; |
115 | 119 |
116 } // namespace content | 120 } // namespace content |
117 | 121 |
118 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ | 122 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ |
OLD | NEW |