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_BROWSER_SURFACE_VIEW_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 10 matching lines...) Expand all Loading... |
21 // BrowserSurfaceViewManager creates and owns a ContentVideoView on behalf of | 21 // BrowserSurfaceViewManager creates and owns a ContentVideoView on behalf of |
22 // a fullscreen media player. Its SurfaceView is registered so that a decoder | 22 // a fullscreen media player. Its SurfaceView is registered so that a decoder |
23 // in the GPU process can look it up and render to it. | 23 // in the GPU process can look it up and render to it. |
24 class CONTENT_EXPORT BrowserSurfaceViewManager | 24 class CONTENT_EXPORT BrowserSurfaceViewManager |
25 : public ContentVideoView::Client { | 25 : public ContentVideoView::Client { |
26 public: | 26 public: |
27 explicit BrowserSurfaceViewManager(RenderFrameHost* render_frame_host); | 27 explicit BrowserSurfaceViewManager(RenderFrameHost* render_frame_host); |
28 ~BrowserSurfaceViewManager(); | 28 ~BrowserSurfaceViewManager(); |
29 | 29 |
30 // ContentVideoView::Client overrides. | 30 // ContentVideoView::Client overrides. |
31 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; | 31 void SetVideoSurface(gl::ScopedJavaSurface surface) override; |
32 void DidExitFullscreen(bool release_media_player) override; | 32 void DidExitFullscreen(bool release_media_player) override; |
33 | 33 |
34 void OnCreateFullscreenSurface(const gfx::Size& video_natural_size); | 34 void OnCreateFullscreenSurface(const gfx::Size& video_natural_size); |
35 void OnNaturalSizeChanged(const gfx::Size& size); | 35 void OnNaturalSizeChanged(const gfx::Size& size); |
36 | 36 |
37 private: | 37 private: |
38 // Send a message to return the surface id to the caller. | 38 // Send a message to return the surface id to the caller. |
39 bool SendSurfaceID(int surface_id); | 39 bool SendSurfaceID(int surface_id); |
40 | 40 |
41 // Synchronously notify the decoder that the surface is being destroyed so it | 41 // Synchronously notify the decoder that the surface is being destroyed so it |
(...skipping 11 matching lines...) Expand all Loading... |
53 | 53 |
54 // The fullscreen view that contains a SurfaceView. | 54 // The fullscreen view that contains a SurfaceView. |
55 std::unique_ptr<ContentVideoView> content_video_view_; | 55 std::unique_ptr<ContentVideoView> content_video_view_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceViewManager); | 57 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceViewManager); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace content | 60 } // namespace content |
61 | 61 |
62 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ | 62 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ |
OLD | NEW |