OLD | NEW |
---|---|
(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, AndroidOve rlayConfig config); | |
xhwang
2017/03/16 19:12:50
nit: 80 char limit?
liberato (no reviews please)
2017/03/16 19:54:14
thanks. didn't notice that 'cl format' skips thes
| |
20 }; | |
21 | |
22 // One overlay instance. This will be provided by the provider to clients | |
23 // elsewhere. Note that you probably want to use media::AndroidOverlay instead | |
24 // of this if you're trying to use overlays somewhere in chromium. The mojo | |
25 // client here is an implementation detail of AndroidOverlay via mojo. | |
26 interface AndroidOverlay { | |
27 // Cause a layout to occur later. | |
28 ScheduleLayout(gfx.mojom.Rect rect); | |
29 }; | |
30 | |
31 // Provided by the client to receive status updates about the overlay. Normally | |
32 // only the AndroidOverlay mojo client will use this directly; application code | |
33 // shouldn't need this. | |
34 interface AndroidOverlayClient { | |
35 // |surface_key| is the key that can be used to retrieve the surface via | |
36 // binder separately. | |
37 OnSurfaceReady(uint64 surface_key); | |
38 | |
39 // Indicates that this overlay has been permanently destroyed, or failed to | |
40 // initialize. It can happen before or after OnSurfaceReady. It will be the | |
41 // last callback from the overlay in any case. | |
42 OnDestroyed(); | |
43 }; | |
44 | |
45 // This is not a mirror of AndroidOverlay::Config, since it contains things that | |
46 // are specific to the mojo implementation. Application code should use that | |
47 // one instead. | |
48 struct AndroidOverlayConfig { | |
49 // |routing_token| provides the client with an opaque handle that will attach | |
50 // an overlay to a the correct WindowAndroid. Typical usage is that a | |
51 // RenderFrameHostImpl will provide this token to the RenderFrame. When the | |
52 // overlay is created, the WindowAndroid that currently hosts the render frame | |
53 // will be the parent of the overlay. For legacy reasons, we need this token | |
54 // to be sent via IPC, so using the message pipe, or other mojo construct, as | |
55 // the identifier won't work yet. | |
56 mojo.common.mojom.UnguessableToken routing_token; | |
xhwang
2017/03/16 19:12:50
nit: empty line here
liberato (no reviews please)
2017/03/16 19:54:14
Done.
| |
57 gfx.mojom.Rect rect; | |
58 }; | |
OLD | NEW |