| Index: media/base/android/dialog_surface_holder.h
|
| diff --git a/media/base/android/dialog_surface_holder.h b/media/base/android/dialog_surface_holder.h
|
| index 919d6af69141e0b8b51f3344328a6ef2d275ee04..a34fc1ccf3f95240c192d520fcd2cb5a3f5169cd 100644
|
| --- a/media/base/android/dialog_surface_holder.h
|
| +++ b/media/base/android/dialog_surface_holder.h
|
| @@ -22,6 +22,10 @@
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gl/android/scoped_java_surface.h"
|
|
|
| +namespace base {
|
| +class WaitableEvent;
|
| +}
|
| +
|
| namespace media {
|
|
|
| class DialogSurfaceCallback;
|
| @@ -45,14 +49,38 @@ class MEDIA_EXPORT DialogSurfaceHolder {
|
| // This may also include pixel format, is_secure, etc.
|
| };
|
|
|
| + // |unwrapped_surface| is the IDialogSurface java instance, which
|
| + // we will take ownership of. |callback| is the wrapped callback that it will
|
| + // use to communicate with us (DialogSurfaceCallback).
|
| + // Note: one generally doesn't want to call this directly. Use
|
| + // DialogSurfaceManager instead.
|
| + DialogSurfaceHolder(const base::android::JavaRef<jobject>& unwrapped_surface,
|
| + std::unique_ptr<DialogSurfaceCallback>&& callback);
|
| + ~DialogSurfaceHolder();
|
| +
|
| // Schedule a relayout and/or reposition of the surface.
|
| - // void ScheduleLayout(const Config& config);
|
| + void ScheduleLayout(const Config& config);
|
|
|
| // Return the java surface, if any. One should not assume that this is
|
| // available immediately. The callback will be called with SURFACE_CREATED
|
| // when it is available. Of course, it may become unavailable again
|
| // asynchronously, so one must always check.
|
| - // gl::ScopedJavaSurface GetSurface();
|
| + gl::ScopedJavaSurface GetSurface();
|
| +
|
| + protected:
|
| + bool CalledOnValidThread() const;
|
| +
|
| + private:
|
| + // Java DialogSurfaceWrapper instance.
|
| + base::android::ScopedJavaGlobalRef<jobject> j_wrapped_surface_;
|
| +
|
| + // Callback that's associated with this surface. We maintain ownership of it
|
| + // so that the native object stays around while we do.
|
| + std::unique_ptr<DialogSurfaceCallback> wrapped_callback_;
|
| +
|
| + base::ThreadChecker thread_checker_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DialogSurfaceHolder);
|
| };
|
|
|
| } // namespace media
|
|
|