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> |
(...skipping 24 matching lines...) Expand all Loading... |
35 // Gets one of the managers associated with the given |render_frame_host|. | 35 // Gets one of the managers associated with the given |render_frame_host|. |
36 // Creates a new one if it doesn't exist. The caller doesn't own the | 36 // Creates a new one if it doesn't exist. The caller doesn't own the |
37 // returned pointer. | 37 // returned pointer. |
38 BrowserMediaPlayerManager* GetMediaPlayerManager( | 38 BrowserMediaPlayerManager* GetMediaPlayerManager( |
39 RenderFrameHost* render_frame_host); | 39 RenderFrameHost* render_frame_host); |
40 BrowserMediaSessionManager* GetMediaSessionManager( | 40 BrowserMediaSessionManager* GetMediaSessionManager( |
41 RenderFrameHost* render_frame_host); | 41 RenderFrameHost* render_frame_host); |
42 BrowserSurfaceViewManager* GetSurfaceViewManager( | 42 BrowserSurfaceViewManager* GetSurfaceViewManager( |
43 RenderFrameHost* render_frame_host); | 43 RenderFrameHost* render_frame_host); |
44 | 44 |
| 45 // Sets or overrides the BrowserMediaSessionManager for the given |
| 46 // |render_frame_host|. |
| 47 void SetMediaSessionManagerForTest( |
| 48 RenderFrameHost* render_frame_host, BrowserMediaSessionManager* manager); |
| 49 |
45 // Called by the WebContents when a tab has been closed but may still be | 50 // Called by the WebContents when a tab has been closed but may still be |
46 // available for "undo" -- indicates that all media players (even audio only | 51 // available for "undo" -- indicates that all media players (even audio only |
47 // players typically allowed background audio) bound to this WebContents must | 52 // players typically allowed background audio) bound to this WebContents must |
48 // be suspended. | 53 // be suspended. |
49 void SuspendAllMediaPlayers(); | 54 void SuspendAllMediaPlayers(); |
50 | 55 |
51 // Initiates a synchronous MediaSession request for browser side players. | 56 // Initiates a synchronous MediaSession request for browser side players. |
52 // | 57 // |
53 // TODO(dalecurtis): Delete this method once we're no longer using WMPA and | 58 // TODO(dalecurtis): Delete this method once we're no longer using WMPA and |
54 // the BrowserMediaPlayerManagers. Tracked by http://crbug.com/580626 | 59 // the BrowserMediaPlayerManagers. Tracked by http://crbug.com/580626 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 base::ScopedPtrHashMap<RenderFrameHost*, | 108 base::ScopedPtrHashMap<RenderFrameHost*, |
104 std::unique_ptr<BrowserSurfaceViewManager>>; | 109 std::unique_ptr<BrowserSurfaceViewManager>>; |
105 SurfaceViewManagerMap surface_view_managers_; | 110 SurfaceViewManagerMap surface_view_managers_; |
106 | 111 |
107 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); | 112 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); |
108 }; | 113 }; |
109 | 114 |
110 } // namespace content | 115 } // namespace content |
111 | 116 |
112 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ | 117 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ |
OLD | NEW |