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 |
| 15 namespace IPC { |
| 16 class Message; |
| 17 } |
| 18 |
| 19 namespace content { |
| 20 |
| 21 class RenderFrameHost; |
| 22 |
| 23 // Creates and owns a ContentVideoView, and registers its SurfaceView so that |
| 24 // a decoder in the GPU process can look it up and render to it. |
| 25 class CONTENT_EXPORT BrowserSurfaceViewManager |
| 26 : public ContentVideoView::Client { |
| 27 public: |
| 28 explicit BrowserSurfaceViewManager(RenderFrameHost* render_frame_host); |
| 29 |
| 30 // ContentVideoView::Client overrides. |
| 31 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; |
| 32 void DidExitFullscreen(bool release_media_player) override; |
| 33 |
| 34 void OnCreateFullscreenSurface(); |
| 35 private: |
| 36 bool Send(IPC::Message* msg); |
| 37 |
| 38 RenderFrameHost* const render_frame_host_; |
| 39 int surface_view_id_; |
| 40 scoped_ptr<ContentVideoView> content_video_view_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceViewManager); |
| 43 }; |
| 44 |
| 45 } // namespace content |
| 46 |
| 47 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_ |
OLD | NEW |