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

Unified Diff: media/gpu/android_video_surface_chooser.h

Issue 2856253004: removed AndroidOverlayFactory (Closed)
Patch Set: cl feedvback Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: media/gpu/android_video_surface_chooser.h
diff --git a/media/gpu/android_video_surface_chooser.h b/media/gpu/android_video_surface_chooser.h
index ce669a40d33167307b7b498e5f404f4bcb5dfae7..b8d4a0524d836dacbdaed3a2e11a7ab9ee660219 100644
--- a/media/gpu/android_video_surface_chooser.h
+++ b/media/gpu/android_video_surface_chooser.h
@@ -9,7 +9,6 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "media/base/android/android_overlay.h"
-#include "media/base/android/android_overlay_factory.h"
#include "media/gpu/media_gpu_export.h"
namespace media {
@@ -20,33 +19,33 @@ class MEDIA_GPU_EXPORT AndroidVideoSurfaceChooser {
// Notify the client that |overlay| is ready for use. The client may get
// the surface immediately.
using UseOverlayCB =
- base::Callback<void(std::unique_ptr<AndroidOverlay> overlay)>;
+ base::RepeatingCallback<void(std::unique_ptr<AndroidOverlay> overlay)>;
// Notify the client that the most recently provided overlay should be
// discarded. The overlay is still valid, but we recommend against
// using it soon, in favor of a SurfaceTexture.
- using UseSurfaceTextureCB = base::Callback<void(void)>;
+ using UseSurfaceTextureCB = base::RepeatingCallback<void(void)>;
// Callback that mirrors AndroidOverlay::DestroyedCB . The surface
// that was provided with |overlay| is being destroyed.
- using StopUsingOverlayImmediatelyCB = base::Callback<void(AndroidOverlay*)>;
+ using StopUsingOverlayImmediatelyCB =
+ base::RepeatingCallback<void(AndroidOverlay*)>;
AndroidVideoSurfaceChooser() {}
virtual ~AndroidVideoSurfaceChooser() {}
// Notify us that our client is ready for overlays. We will send it a
// callback telling it whether to start with a SurfaceTexture or overlay,
- // either synchronously or post one very soon.
- virtual void Initialize(
- UseOverlayCB use_overlay_cb,
- UseSurfaceTextureCB use_surface_texture_cb,
- StopUsingOverlayImmediatelyCB stop_immediately_cb,
- std::unique_ptr<AndroidOverlayFactory> initial_factory) = 0;
-
- // Notify us that a new factory has arrived. May be null to indicate that
- // the most recent factory has been revoked.
- virtual void ReplaceOverlayFactory(
- std::unique_ptr<AndroidOverlayFactory> factory) = 0;
+ // either synchronously or post one very soon. |initial_factory| can be
+ // an empty callback to indicate "no factory".
+ virtual void Initialize(UseOverlayCB use_overlay_cb,
+ UseSurfaceTextureCB use_surface_texture_cb,
+ StopUsingOverlayImmediatelyCB stop_immediately_cb,
+ AndroidOverlayFactoryCB initial_factory) = 0;
+
+ // Notify us that a new factory has arrived. May be is_null() to indicate
+ // that the most recent factory has been revoked.
+ virtual void ReplaceOverlayFactory(AndroidOverlayFactoryCB factory) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(AndroidVideoSurfaceChooser);

Powered by Google App Engine
This is Rietveld 408576698