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

Unified Diff: media/base/android/dialog_surface.h

Issue 2178973004: DialogSurfaceManager implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 5 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/base/android/dialog_surface.h
diff --git a/media/base/android/dialog_surface.h b/media/base/android/dialog_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..39d2ff493b7e2ee5dea8132e9106fe9e48aca120
--- /dev/null
+++ b/media/base/android/dialog_surface.h
@@ -0,0 +1,53 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_ANDROID_DIALOG_SURFACE_H_
+#define MEDIA_BASE_ANDROID_DIALOG_SURFACE_H_
+
+#include <jni.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include <set>
+#include <string>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/task_runner.h"
+#include "base/threading/thread_checker.h"
+#include "base/time/time.h"
+#include "media/base/media_export.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gl/android/scoped_java_surface.h"
+
+namespace media {
+
+class DialogSurfaceCallback;
+class DialogSurfaceManager;
+
+// This class implements the C++ wrapper around a java DialogSurface.
+// All callbacks happen on the thread that it's constructed on.
+class MEDIA_EXPORT DialogSurface {
+ public:
+ // These must match DialogSurface.java
+ enum CallbackOp { SURFACE_CREATED = 0, SURFACE_DESTROYED = 1 };
+
+ // Callback type for finding out about the status of the surface. While we
+ // don't use this directly, it lets us keep DialogSurfaceCallback as an
+ // implementation detail.
+ using Callback = base::Callback<void(CallbackOp)>;
+
+ // Configuration for the surface.
+ struct Config {
DaleCurtis 2016/07/27 18:14:19 Could be just a gfx::Rect?
liberato (no reviews please) 2016/07/28 15:33:30 Done.
+ gfx::Point position;
+ gfx::Size size;
+ // This may also include pixel format, is_secure, etc.
+ };
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_ANDROID_DIALOG_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698