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

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

Issue 714643002: Pause EME player whose external surface is stolen by another player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ReleaseCurrentExternalVideoSurface() Created 6 years 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // Called when a media player wants to request an external video surface. 26 // Called when a media player wants to request an external video surface.
27 // Whenever the surface is created and visible, |surface_created_cb| will be 27 // Whenever the surface is created and visible, |surface_created_cb| will be
28 // called. And whenever it is destroyed or invisible, |surface_destroyed_cb| 28 // called. And whenever it is destroyed or invisible, |surface_destroyed_cb|
29 // will be called. 29 // will be called.
30 virtual void RequestExternalVideoSurface( 30 virtual void RequestExternalVideoSurface(
31 int player_id, 31 int player_id,
32 const SurfaceCreatedCB& surface_created_cb, 32 const SurfaceCreatedCB& surface_created_cb,
33 const SurfaceDestroyedCB& surface_destroyed_cb) = 0; 33 const SurfaceDestroyedCB& surface_destroyed_cb) = 0;
34 34
35 // Called when a media player wants to release an external video surface. 35 // Returns id of player currently using the external video surface.
36 virtual int GetCurrentPlayerId() = 0;
boliu 2014/12/08 17:51:47 How about define INVALID_PLAYER_ID in this class.
Hugo Holgersson 2014/12/09 15:35:28 Done.
37
38 // Called when a media player wants to release a certain player's external
39 // video surface.
36 virtual void ReleaseExternalVideoSurface(int player_id) = 0; 40 virtual void ReleaseExternalVideoSurface(int player_id) = 0;
37 41
38 // Called when the position and size of the video element which uses 42 // Called when the position and size of the video element which uses
39 // the external video surface is changed. 43 // the external video surface is changed.
40 // |rect| contains the new position and size in css pixels. 44 // |rect| contains the new position and size in css pixels.
41 virtual void OnExternalVideoSurfacePositionChanged( 45 virtual void OnExternalVideoSurfacePositionChanged(
42 int player_id, const gfx::RectF& rect) = 0; 46 int player_id, const gfx::RectF& rect) = 0;
43 47
44 // Called when the page that contains the video element is scrolled or zoomed. 48 // Called when the page that contains the video element is scrolled or zoomed.
45 virtual void OnFrameInfoUpdated() = 0; 49 virtual void OnFrameInfoUpdated() = 0;
46 50
47 virtual ~ExternalVideoSurfaceContainer() {} 51 virtual ~ExternalVideoSurfaceContainer() {}
48 }; 52 };
49 53
50 } // namespace content 54 } // namespace content
51 55
52 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_ 56 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698