| 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 // Spec: https://wicg.github.io/mediasession/ | 11 // Spec: https://wicg.github.io/mediasession/ |
| 12 enum MediaSessionAction { | 12 enum MediaSessionAction { |
| 13 PLAY, | 13 PLAY, |
| 14 PAUSE, | 14 PAUSE, |
| 15 PLAY_PAUSE, | 15 PLAY_PAUSE, |
| 16 PREVIOUS_TRACK, | 16 PREVIOUS_TRACK, |
| 17 NEXT_TRACK, | 17 NEXT_TRACK, |
| 18 SEEK_BACKWARD, | 18 SEEK_BACKWARD, |
| 19 SEEK_FORWARD, | 19 SEEK_FORWARD, |
| 20 |
| 21 LAST = SEEK_FORWARD, |
| 20 }; | 22 }; |
| 21 | 23 |
| 22 // Album art in MediaMetadata | 24 // Album art in MediaMetadata |
| 23 // Spec: https://wicg.github.io/mediasession/ | 25 // Spec: https://wicg.github.io/mediasession/ |
| 24 struct MediaImage { | 26 struct MediaImage { |
| 25 url.mojom.Url src; | 27 url.mojom.Url src; |
| 26 mojo.common.mojom.String16 type; | 28 mojo.common.mojom.String16 type; |
| 27 array<gfx.mojom.Size> sizes; | 29 array<gfx.mojom.Size> sizes; |
| 28 }; | 30 }; |
| 29 | 31 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 53 | 55 |
| 54 // Notifies the browser that the event handler for |action| has been set, | 56 // Notifies the browser that the event handler for |action| has been set, |
| 55 // browser needs to show a media button in the UI or register listeners to the | 57 // browser needs to show a media button in the UI or register listeners to the |
| 56 // platform. | 58 // platform. |
| 57 EnableAction(MediaSessionAction action); | 59 EnableAction(MediaSessionAction action); |
| 58 // Notifies the browser that the event handler for |action| has been set, | 60 // Notifies the browser that the event handler for |action| has been set, |
| 59 // browser needs to hide the media button in the UI and unregister listeners | 61 // browser needs to hide the media button in the UI and unregister listeners |
| 60 // from the platform. | 62 // from the platform. |
| 61 DisableAction(MediaSessionAction action); | 63 DisableAction(MediaSessionAction action); |
| 62 }; | 64 }; |
| OLD | NEW |