| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // IPC messages for the Media Session API. | 5 // IPC messages for the Media Session API. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "content/common/android/gin_java_bridge_errors.h" | 8 #include "content/common/android/gin_java_bridge_errors.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/common/media_metadata.h" |
| 10 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
| 11 | 12 |
| 12 #undef IPC_MESSAGE_EXPORT | 13 #undef IPC_MESSAGE_EXPORT |
| 13 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 14 #define IPC_MESSAGE_START MediaSessionMsgStart | 15 #define IPC_MESSAGE_START MediaSessionMsgStart |
| 15 | 16 |
| 17 IPC_STRUCT_TRAITS_BEGIN(content::MediaMetadata) |
| 18 IPC_STRUCT_TRAITS_MEMBER(title) |
| 19 IPC_STRUCT_TRAITS_MEMBER(artist) |
| 20 IPC_STRUCT_TRAITS_MEMBER(album) |
| 21 IPC_STRUCT_TRAITS_END() |
| 22 |
| 16 // Messages for notifying the render process of media session status ------- | 23 // Messages for notifying the render process of media session status ------- |
| 17 | 24 |
| 18 IPC_MESSAGE_ROUTED2(MediaSessionMsg_DidActivate, | 25 IPC_MESSAGE_ROUTED2(MediaSessionMsg_DidActivate, |
| 19 int /* request_id */, | 26 int /* request_id */, |
| 20 bool /* success */) | 27 bool /* success */) |
| 21 | 28 |
| 22 IPC_MESSAGE_ROUTED1(MediaSessionMsg_DidDeactivate, int /* request_id */) | 29 IPC_MESSAGE_ROUTED1(MediaSessionMsg_DidDeactivate, int /* request_id */) |
| 23 | 30 |
| 24 // Messages for controlling the media session in browser process ---------- | 31 // Messages for controlling the media session in browser process ---------- |
| 25 | 32 |
| 26 IPC_MESSAGE_ROUTED2(MediaSessionHostMsg_Activate, | 33 IPC_MESSAGE_ROUTED2(MediaSessionHostMsg_Activate, |
| 27 int /* session_id */, | 34 int /* session_id */, |
| 28 int /* request_id */) | 35 int /* request_id */) |
| 29 | 36 |
| 30 IPC_MESSAGE_ROUTED2(MediaSessionHostMsg_Deactivate, | 37 IPC_MESSAGE_ROUTED2(MediaSessionHostMsg_Deactivate, |
| 31 int /* session_id */, | 38 int /* session_id */, |
| 32 int /* request_id */) | 39 int /* request_id */) |
| 40 |
| 41 IPC_MESSAGE_ROUTED2(MediaSessionHostMsg_SetMetadata, |
| 42 int /* request_id*/, |
| 43 content::MediaMetadata /* metadata */) |
| OLD | NEW |