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

Side by Side Diff: content/public/browser/android/video_surface_provider.h

Issue 2567233002: Use GVR async reprojection video surface for fullscreen in VR shell
Patch Set: Refactor using new interface and manager, also rebased Created 3 years, 11 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
« no previous file with comments | « content/public/browser/android/video_surface_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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_PUBLIC_BROWSER_ANDROID_VIDEO_SURFACE_PROVIDER_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_VIDEO_SURFACE_PROVIDER_H_
7
8 #include "content/common/content_export.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gl/android/scoped_java_surface.h"
11
12 namespace content {
13
14 class CONTENT_EXPORT VideoSurfaceProvider {
15 public:
16 class Client {
17 public:
18 // For receiving notififcations when the surface is created and
19 // destroyed. When |surface.IsEmpty()| the surface was destroyed and
20 // the client should not hold any references to it once this returns.
21 virtual void SetVideoSurface(gl::ScopedJavaSurface surface) = 0;
22
23 // Called after the video surface has been hidden because we're exiting
24 // fullscreen.
25 virtual void DidExitFullscreen(bool release_media_player) = 0;
26
27 protected:
28 Client() {}
29 ~Client() {}
30
31 DISALLOW_COPY_AND_ASSIGN(Client);
32 };
33
34 // Update the video size.
35 virtual void OnVideoSizeChanged(int width, int height) = 0;
36
37 // Create the video surface and call back to the client when done.
38 virtual void CreateVideoSurface(Client* client,
39 const gfx::Size& video_natural_size) = 0;
40 VideoSurfaceProvider() {}
41 ~VideoSurfaceProvider() {}
42
43 DISALLOW_COPY_AND_ASSIGN(VideoSurfaceProvider);
44
45 };
46
47 } // namespace content
48 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_VIDEO_SURFACE_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/public/browser/android/video_surface_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698