Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ | |
| 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "content/browser/android/content_video_view.h" | |
| 13 #include "content/common/content_export.h" | |
| 14 #include "ui/gfx/geometry/size.h" | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 class RenderFrameHost; | |
| 19 | |
| 20 // BrowserSurfaceViewManager creates and owns a ContentVideoView on behalf of | |
| 21 // a fullscreen media player. Its SurfaceView is registered so that a decoder | |
| 22 // in the GPU process can look it up and render to it. | |
| 23 class CONTENT_EXPORT BrowserSurfaceViewManager | |
| 24 : public ContentVideoView::Client { | |
| 25 public: | |
| 26 explicit BrowserSurfaceViewManager(RenderFrameHost* render_frame_host); | |
| 27 | |
| 28 // ContentVideoView::Client overrides. | |
| 29 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; | |
| 30 void DidExitFullscreen(bool release_media_player) override; | |
| 31 | |
| 32 void OnCreateFullscreenSurface(gfx::Size video_size); | |
|
DaleCurtis
2016/02/06 00:17:39
Should we pass these by const& ?
watk
2016/02/11 23:03:25
Done.
| |
| 33 void OnFullscreenVideoSizeChanged(gfx::Size size); | |
| 34 | |
| 35 private: | |
| 36 // Send a message to return the surface id to the caller. | |
| 37 bool SendSurfaceID(int surface_id); | |
| 38 | |
| 39 RenderFrameHost* const render_frame_host_; | |
| 40 // The surface id of the ContentVideoView surface. | |
|
DaleCurtis
2016/02/06 00:17:39
Blank lines between comment and previous code.
watk
2016/02/11 23:03:25
Done.
| |
| 41 int surface_id_; | |
| 42 // The fullscreen view that contains a SurfaceView. | |
| 43 scoped_ptr<ContentVideoView> content_video_view_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceViewManager); | |
| 46 }; | |
| 47 | |
| 48 } // namespace content | |
| 49 | |
| 50 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ | |
| OLD | NEW |