| 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, |
| 49 std::unique_ptr<BrowserMediaSessionManager>& manager); |
| 50 |
| 45 // Called by the WebContents when a tab has been closed but may still be | 51 // 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 | 52 // available for "undo" -- indicates that all media players (even audio only |
| 47 // players typically allowed background audio) bound to this WebContents must | 53 // players typically allowed background audio) bound to this WebContents must |
| 48 // be suspended. | 54 // be suspended. |
| 49 void SuspendAllMediaPlayers(); | 55 void SuspendAllMediaPlayers(); |
| 50 | 56 |
| 51 // Initiates a synchronous MediaSession request for browser side players. | 57 // Initiates a synchronous MediaSession request for browser side players. |
| 52 // | 58 // |
| 53 // TODO(dalecurtis): Delete this method once we're no longer using WMPA and | 59 // TODO(dalecurtis): Delete this method once we're no longer using WMPA and |
| 54 // the BrowserMediaPlayerManagers. Tracked by http://crbug.com/580626 | 60 // 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*, | 109 base::ScopedPtrHashMap<RenderFrameHost*, |
| 104 std::unique_ptr<BrowserSurfaceViewManager>>; | 110 std::unique_ptr<BrowserSurfaceViewManager>>; |
| 105 SurfaceViewManagerMap surface_view_managers_; | 111 SurfaceViewManagerMap surface_view_managers_; |
| 106 | 112 |
| 107 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); | 113 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserverAndroid); |
| 108 }; | 114 }; |
| 109 | 115 |
| 110 } // namespace content | 116 } // namespace content |
| 111 | 117 |
| 112 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ | 118 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_ANDROID_H_ |
| OLD | NEW |