OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module blink.mojom; | 5 module blink.mojom; |
6 | 6 |
7 import "mojo/common/common_custom_types.mojom"; | 7 import "mojo/common/common_custom_types.mojom"; |
8 import "ui/gfx/geometry/mojo/geometry.mojom"; | 8 import "ui/gfx/geometry/mojo/geometry.mojom"; |
9 import "url/mojo/url.mojom"; | 9 import "url/mojo/url.mojom"; |
10 | 10 |
11 // Album art in MediaMetadata | 11 // Album art in MediaMetadata |
12 // Spec: https://wicg.github.io/mediasession/ | 12 // Spec: https://wicg.github.io/mediasession/ |
13 struct MediaImage { | 13 struct MediaImage { |
14 url.mojom.Url src; | 14 url.mojom.Url src; |
15 mojo.common.mojom.String16 type; | 15 mojo.common.mojom.String16 type; |
16 array<gfx.mojom.Size> sizes; | 16 array<gfx.mojom.Size> sizes; |
17 }; | 17 }; |
18 | 18 |
19 // MediaMetadata | 19 // MediaMetadata |
20 // Spec: https://wicg.github.io/mediasession/ | 20 // Spec: https://wicg.github.io/mediasession/ |
21 struct MediaMetadata { | 21 struct MediaMetadata { |
22 mojo.common.mojom.String16 title; | 22 mojo.common.mojom.String16 title; |
23 mojo.common.mojom.String16 artist; | 23 mojo.common.mojom.String16 artist; |
24 mojo.common.mojom.String16 album; | 24 mojo.common.mojom.String16 album; |
25 array<MediaImage> artwork; | 25 array<MediaImage> artwork; |
26 }; | 26 }; |
27 | 27 |
28 interface MediaSessionClient { | |
29 DidReceivedAction(string action); | |
whywhat
2016/10/17 15:38:43
Could you change action from string to enum?
Zhiqiang Zhang (Slow)
2016/10/17 21:17:39
Done. However it seems mapping values enum (or int
| |
30 }; | |
31 | |
28 interface MediaSessionService { | 32 interface MediaSessionService { |
33 // MediaSessionClient interface is to used to notify Blink MediaSession of | |
34 // media control actions. | |
35 SetClient(MediaSessionClient client); | |
36 | |
29 SetMetadata(MediaMetadata? metadata); | 37 SetMetadata(MediaMetadata? metadata); |
38 | |
39 DidSetEventHandlerForAction(string action, bool is_set); | |
whywhat
2016/10/17 15:38:43
Could you change is_set to two methods?
Maybe the
Zhiqiang Zhang (Slow)
2016/10/17 21:17:39
Done.
| |
30 }; | 40 }; |
OLD | NEW |