| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 public ContentVideoView::Client { | 41 public ContentVideoView::Client { |
| 42 public: | 42 public: |
| 43 // Permits embedders to provide an extended version of the class. | 43 // Permits embedders to provide an extended version of the class. |
| 44 typedef BrowserMediaPlayerManager* (*Factory)(RenderFrameHost*); | 44 typedef BrowserMediaPlayerManager* (*Factory)(RenderFrameHost*); |
| 45 static void RegisterFactory(Factory factory); | 45 static void RegisterFactory(Factory factory); |
| 46 | 46 |
| 47 // Permits embedders to handle custom urls. | 47 // Permits embedders to handle custom urls. |
| 48 static void RegisterMediaUrlInterceptor( | 48 static void RegisterMediaUrlInterceptor( |
| 49 media::MediaUrlInterceptor* media_url_interceptor); | 49 media::MediaUrlInterceptor* media_url_interceptor); |
| 50 | 50 |
| 51 // Init the SurfaceTexturePeer. | |
| 52 static void InitSurfaceTexturePeer(); | |
| 53 | |
| 54 // Pass a java surface object to the MediaPlayerAndroid object | |
| 55 // identified by render process handle, render frame ID and player ID. | |
| 56 static void SetSurfacePeer(scoped_refptr<gl::SurfaceTexture> surface_texture, | |
| 57 base::ProcessHandle render_process_handle, | |
| 58 int render_frame_id, | |
| 59 int player_id); | |
| 60 | |
| 61 // Returns a new instance using the registered factory if available. | 51 // Returns a new instance using the registered factory if available. |
| 62 static BrowserMediaPlayerManager* Create(RenderFrameHost* rfh); | 52 static BrowserMediaPlayerManager* Create(RenderFrameHost* rfh); |
| 63 | 53 |
| 64 #if !defined(USE_AURA) | 54 #if !defined(USE_AURA) |
| 65 ContentViewCore* GetContentViewCore() const; | 55 ContentViewCore* GetContentViewCore() const; |
| 66 #endif | 56 #endif |
| 67 | 57 |
| 68 ~BrowserMediaPlayerManager() override; | 58 ~BrowserMediaPlayerManager() override; |
| 69 | 59 |
| 70 // ContentVideoView::Client implementation. | 60 // ContentVideoView::Client implementation. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 197 |
| 208 // NOTE: Weak pointers must be invalidated before all other member variables. | 198 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 209 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 199 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 210 | 200 |
| 211 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 201 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 212 }; | 202 }; |
| 213 | 203 |
| 214 } // namespace content | 204 } // namespace content |
| 215 | 205 |
| 216 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 206 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |