Chromium Code Reviews| Index: content/public/browser/android/external_video_surface_container.h |
| diff --git a/content/public/browser/android/external_video_surface_container.h b/content/public/browser/android/external_video_surface_container.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fbcd8e557a73080b5cd0175874b89bdb5bc62da8 |
| --- /dev/null |
| +++ b/content/public/browser/android/external_video_surface_container.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
|
Ted C
2014/02/18 20:03:14
no (c)
ycheo (away)
2014/02/18 22:28:40
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_ |
| +#define CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include "base/callback.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace gfx { |
| +class RectF; |
| +} |
| + |
| +namespace content { |
| +class WebContents; |
| + |
| +class CONTENT_EXPORT ExternalVideoSurfaceContainer { |
|
Ted C
2014/02/18 20:03:14
Some documentation on this class would be good.
ycheo (away)
2014/02/18 22:28:40
Done.
|
| + public: |
| + typedef base::Callback<void(int, jobject)> SurfaceCreatedCB; |
| + typedef base::Callback<void(int)> SurfaceDestroyedCB; |
| + |
| + static ExternalVideoSurfaceContainer* FromWebContents(WebContents* contents); |
| + static void CreateForWebContents(WebContents* contents); |
| + |
| + virtual void RequestExternalVideoSurface( |
| + int player_id, |
| + const SurfaceCreatedCB& surface_created_cb, |
| + const SurfaceDestroyedCB& surface_destroyed_cb) = 0; |
| + virtual void ReleaseExternalVideoSurface(int player_id) = 0; |
| + virtual void OnFrameInfoUpdated() = 0; |
| + virtual void OnExternalVideoSurfacePositionChanged( |
| + int player_id, const gfx::RectF& rect) = 0; |
| + |
| + protected: |
| + virtual ~ExternalVideoSurfaceContainer() {} |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_ANDROID_EXTERNAL_VIDEO_SURFACE_CONTAINER_H_ |