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

Unified Diff: media/mojo/interfaces/android_overlay.mojom

Issue 2688193002: Mojo framework for AndroidOverlay. (Closed)
Patch Set: cl comments, refactored MojoAndroidOverlay to inherit from mojom:... Created 3 years, 10 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/mojo/interfaces/android_overlay.mojom
diff --git a/media/mojo/interfaces/android_overlay.mojom b/media/mojo/interfaces/android_overlay.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..257c7715321f1b4c499cf21b3f226e0ae74852fd
--- /dev/null
+++ b/media/mojo/interfaces/android_overlay.mojom
@@ -0,0 +1,45 @@
+// Copyright 2017 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.
+
+module media.mojom;
+
+import "media/mojo/interfaces/media_types.mojom";
+import "ui/gfx/geometry/mojo/geometry.mojom";
+
+interface AndroidOverlayProvider {
+ // Create an overlay and send it to |client|, using |config| as the initial
+ // configuration. |client| will be notified when the overlay is ready.
+ CreateOverlay(AndroidOverlayClient client, AndroidOverlayConfig config);
+};
+
+// One overlay instance.
+interface AndroidOverlay {
+ // Cause a layout to occur later.
+ ScheduleLayout(gfx.mojom.Rect rect);
+};
+
+// Provided by the client to receive status updates about the overlay.
+interface AndroidOverlayClient {
+ // |overlay| is the AndroidOverlay that was created in response to a
+ // CreateOverlay request.
+ OnInitialized(AndroidOverlay overlay);
dcheng 2017/02/28 05:22:04 Can we remove the need for this method by plumbing
liberato (no reviews please) 2017/03/06 07:51:05 thanks, done!
+
+ // |surface_key| is the key that can be used to retrieve the surface via
+ // binder separately.
+ OnSurfaceReady(uint64 surface_key);
+
+ // Indicates that this overlay has been permanently destroyed. This can
+ // happen before OnInitialized, or before OnSurfaceReady. It will be the last
+ // callback from the overlay in any case.
+ OnDestroyed();
+};
+
+// This is not a mirror of AndroidOverlay::Config, since it contains things that
+// are specific to the mojo implementation.
+struct AndroidOverlayConfig {
+ uint32 render_frame_id;
+ uint32 renderer_pid;
dcheng 2017/02/28 05:22:04 We shouldn't be passing render frame ID or the ren
liberato (no reviews please) 2017/03/06 07:51:05 this came up earlier. this isn't exposed to the r
+
+ gfx.mojom.Rect rect;
+};
« media/mojo/clients/mojo_android_overlay_factory.h ('K') | « media/mojo/interfaces/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698