Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: content/browser/media/android/browser_surface_view_manager.h

Issue 1655083002: Enable SurfaceView fullscreen video on Android with WebMediaPlayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avda-sv
Patch Set: Adressed comments; moved blink parts to another CL Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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(const gfx::Size& video_natural_size);
33 void OnNaturalSizeChanged(const 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
41 // The surface id of the ContentVideoView surface.
42 int surface_id_;
43
44 // The fullscreen view that contains a SurfaceView.
45 scoped_ptr<ContentVideoView> content_video_view_;
46
47 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceViewManager);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_SURFACE_VIEW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698