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

Side by Side Diff: media/mojo/interfaces/android_overlay.mojom

Issue 2688193002: Mojo framework for AndroidOverlay. (Closed)
Patch Set: fixed mojo manifest bug introduced by rebase Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « media/mojo/interfaces/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module media.mojom;
6
7 import "media/mojo/interfaces/media_types.mojom";
8 import "mojo/common/unguessable_token.mojom";
9 import "ui/gfx/geometry/mojo/geometry.mojom";
10
11 // Provides mojo clients with AndroidOverlay instances. This will live in the
12 // browser, with clients in the GPU process or renderer. Note that if you're
13 // trying to use overlays somewhere in chromium, then this isn't the interface
14 // you're looking for. Please see media::AndroidOverlayFactory instead. The
15 // AndroidOverlayProvider mojo client implements that interface.
16 interface AndroidOverlayProvider {
17 // Create an overlay and send it to |client|, using |config| as the initial
18 // configuration. |overlay| will hold the overlay object.
19 CreateOverlay(AndroidOverlay& overlay, AndroidOverlayClient client,
20 AndroidOverlayConfig config);
21 };
22
23 // One overlay instance. This will be provided by the provider to clients
24 // elsewhere. Note that you probably want to use media::AndroidOverlay instead
25 // of this if you're trying to use overlays somewhere in chromium. The mojo
26 // client here is an implementation detail of AndroidOverlay via mojo.
27 interface AndroidOverlay {
28 // Cause a layout to occur later.
29 ScheduleLayout(gfx.mojom.Rect rect);
30 };
31
32 // Provided by the client to receive status updates about the overlay. Normally
33 // only the AndroidOverlay mojo client will use this directly; application code
34 // shouldn't need this.
35 interface AndroidOverlayClient {
36 // |surface_key| is the key that can be used to retrieve the surface via
37 // binder separately.
38 OnSurfaceReady(uint64 surface_key);
39
40 // Indicates that this overlay has been permanently destroyed, or failed to
41 // initialize. It can happen before or after OnSurfaceReady. It will be the
42 // last callback from the overlay in any case.
43 OnDestroyed();
44 };
45
46 // This is not a mirror of AndroidOverlay::Config, since it contains things that
47 // are specific to the mojo implementation. Application code should use that
48 // one instead.
49 struct AndroidOverlayConfig {
50 // |routing_token| provides the client with an opaque handle that will attach
51 // an overlay to a the correct WindowAndroid. Typical usage is that a
52 // RenderFrameHostImpl will provide this token to the RenderFrame. When the
53 // overlay is created, the WindowAndroid that currently hosts the render frame
54 // will be the parent of the overlay. For legacy reasons, we need this token
55 // to be sent via IPC, so using the message pipe, or other mojo construct, as
56 // the identifier won't work yet.
57 mojo.common.mojom.UnguessableToken routing_token;
58
59 gfx.mojom.Rect rect;
60 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698