Chromium Code Reviews| 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..f3141668f149b60e9c70af95202db4e1f7f10696 |
| --- /dev/null |
| +++ b/media/mojo/interfaces/android_overlay.mojom |
| @@ -0,0 +1,40 @@ |
| +// 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 "mojo/common/unguessable_token.mojom"; |
| +import "ui/gfx/geometry/mojo/geometry.mojom"; |
| + |
| +interface AndroidOverlayProvider { |
|
dcheng
2017/03/16 08:54:25
Also, some interface level comments that describe
liberato (no reviews please)
2017/03/16 16:53:53
Done.
|
| + // Create an overlay and send it to |client|, using |config| as the initial |
| + // configuration. |overlay| will hold the overlay object. |
| + CreateOverlay(AndroidOverlay& overlay, 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 { |
| + // |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, or failed to |
| + // initialize. It can happen before or after 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 { |
| + mojo.common.mojom.UnguessableToken routing_token; |
|
dcheng
2017/03/16 08:51:39
Nit: please add some comments that describe why ro
liberato (no reviews please)
2017/03/16 16:53:53
Done. TL;DR: it must be sent via IPC for now.
|
| + gfx.mojom.Rect rect; |
| +}; |