| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 public ContentVideoView::Client { | 47 public ContentVideoView::Client { |
| 48 public: | 48 public: |
| 49 // Permits embedders to provide an extended version of the class. | 49 // Permits embedders to provide an extended version of the class. |
| 50 typedef BrowserMediaPlayerManager* (*Factory)(RenderFrameHost*); | 50 typedef BrowserMediaPlayerManager* (*Factory)(RenderFrameHost*); |
| 51 static void RegisterFactory(Factory factory); | 51 static void RegisterFactory(Factory factory); |
| 52 | 52 |
| 53 // Permits embedders to handle custom urls. | 53 // Permits embedders to handle custom urls. |
| 54 static void RegisterMediaUrlInterceptor( | 54 static void RegisterMediaUrlInterceptor( |
| 55 media::MediaUrlInterceptor* media_url_interceptor); | 55 media::MediaUrlInterceptor* media_url_interceptor); |
| 56 | 56 |
| 57 // Init the SurfaceTexturePeer. |
| 58 static void InitSurfaceTexturePeer(); |
| 59 |
| 57 // Pass a java surface object to the MediaPlayerAndroid object | 60 // Pass a java surface object to the MediaPlayerAndroid object |
| 58 // identified by render process handle, render frame ID and player ID. | 61 // identified by render process handle, render frame ID and player ID. |
| 59 static void SetSurfacePeer(scoped_refptr<gfx::SurfaceTexture> surface_texture, | 62 static void SetSurfacePeer(scoped_refptr<gfx::SurfaceTexture> surface_texture, |
| 60 base::ProcessHandle render_process_handle, | 63 base::ProcessHandle render_process_handle, |
| 61 int render_frame_id, | 64 int render_frame_id, |
| 62 int player_id); | 65 int player_id); |
| 63 | 66 |
| 64 // Returns a new instance using the registered factory if available. | 67 // Returns a new instance using the registered factory if available. |
| 65 static BrowserMediaPlayerManager* Create(RenderFrameHost* rfh); | 68 static BrowserMediaPlayerManager* Create(RenderFrameHost* rfh); |
| 66 | 69 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 235 |
| 233 // NOTE: Weak pointers must be invalidated before all other member variables. | 236 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 234 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; | 237 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; |
| 235 | 238 |
| 236 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); | 239 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); |
| 237 }; | 240 }; |
| 238 | 241 |
| 239 } // namespace content | 242 } // namespace content |
| 240 | 243 |
| 241 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ | 244 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |