OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 content decryption module (CDM) implementation. | 5 // IPC messages for content decryption module (CDM) implementation. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/media/cdm_messages_enums.h" | 13 #include "content/common/media/cdm_messages_enums.h" |
14 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
15 #include "media/base/cdm_key_information.h" | 15 #include "media/base/cdm_key_information.h" |
16 #include "media/base/media_keys.h" | 16 #include "media/base/media_keys.h" |
17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
18 | 18 |
19 #ifndef CONTENT_COMMON_MEDIA_CDM_MESSAGES_H_ | |
20 #define CONTENT_COMMON_MEDIA_CDM_MESSAGES_H_ | |
21 | |
22 namespace content { | |
23 | |
24 struct InitializeCdmParameters { | |
nasko
2015/05/14 21:53:18
structs should be defined using IPC_STRUCT_BEGIN/I
sandersd (OOO until July 31)
2015/05/14 22:05:16
Oh excellent, that looks much better.
| |
25 std::string key_system; | |
26 GURL security_origin; | |
27 bool use_hw_secure_codecs = false; | |
28 }; | |
29 | |
30 } // namespace content | |
31 | |
32 #endif // CONTENT_COMMON_MEDIA_CDM_MESSAGES_H_ | |
33 | |
19 #undef IPC_MESSAGE_EXPORT | 34 #undef IPC_MESSAGE_EXPORT |
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 35 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
21 #define IPC_MESSAGE_START CdmMsgStart | 36 #define IPC_MESSAGE_START CdmMsgStart |
22 | 37 |
23 IPC_ENUM_TRAITS_MAX_VALUE(media::CdmKeyInformation::KeyStatus, | 38 IPC_ENUM_TRAITS_MAX_VALUE(media::CdmKeyInformation::KeyStatus, |
24 media::CdmKeyInformation::KEY_STATUS_MAX) | 39 media::CdmKeyInformation::KEY_STATUS_MAX) |
25 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaKeys::Exception, | 40 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaKeys::Exception, |
26 media::MediaKeys::EXCEPTION_MAX) | 41 media::MediaKeys::EXCEPTION_MAX) |
27 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaKeys::MessageType, | 42 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaKeys::MessageType, |
28 media::MediaKeys::MESSAGE_TYPE_MAX) | 43 media::MediaKeys::MESSAGE_TYPE_MAX) |
29 IPC_ENUM_TRAITS_MAX_VALUE(CdmHostMsg_CreateSession_InitDataType, | 44 IPC_ENUM_TRAITS_MAX_VALUE(CdmHostMsg_CreateSession_InitDataType, |
30 INIT_DATA_TYPE_MAX) | 45 INIT_DATA_TYPE_MAX) |
31 | 46 |
32 IPC_STRUCT_TRAITS_BEGIN(media::CdmKeyInformation) | 47 IPC_STRUCT_TRAITS_BEGIN(media::CdmKeyInformation) |
33 IPC_STRUCT_TRAITS_MEMBER(key_id) | 48 IPC_STRUCT_TRAITS_MEMBER(key_id) |
34 IPC_STRUCT_TRAITS_MEMBER(status) | 49 IPC_STRUCT_TRAITS_MEMBER(status) |
35 IPC_STRUCT_TRAITS_MEMBER(system_code) | 50 IPC_STRUCT_TRAITS_MEMBER(system_code) |
36 IPC_STRUCT_TRAITS_END() | 51 IPC_STRUCT_TRAITS_END() |
37 | 52 |
53 IPC_STRUCT_TRAITS_BEGIN(content::InitializeCdmParameters) | |
54 IPC_STRUCT_TRAITS_MEMBER(key_system) | |
55 IPC_STRUCT_TRAITS_MEMBER(security_origin) | |
56 IPC_STRUCT_TRAITS_MEMBER(use_hw_secure_codecs) | |
57 IPC_STRUCT_TRAITS_END() | |
58 | |
38 // Messages from render to browser. | 59 // Messages from render to browser. |
39 | 60 |
40 IPC_MESSAGE_CONTROL5(CdmHostMsg_InitializeCdm, | 61 IPC_MESSAGE_CONTROL4(CdmHostMsg_InitializeCdm, |
41 int /* render_frame_id */, | 62 int /* render_frame_id */, |
42 int /* cdm_id */, | 63 int /* cdm_id */, |
43 uint32_t /* promise_id */, | 64 uint32_t /* promise_id */, |
44 std::string /* key_system */, | 65 content::InitializeCdmParameters /* parameters */) |
45 GURL /* security_origin */) | |
46 | 66 |
47 IPC_MESSAGE_CONTROL4(CdmHostMsg_SetServerCertificate, | 67 IPC_MESSAGE_CONTROL4(CdmHostMsg_SetServerCertificate, |
48 int /* render_frame_id */, | 68 int /* render_frame_id */, |
49 int /* cdm_id */, | 69 int /* cdm_id */, |
50 uint32_t /* promise_id */, | 70 uint32_t /* promise_id */, |
51 std::vector<uint8_t> /* certificate */) | 71 std::vector<uint8_t> /* certificate */) |
52 | 72 |
53 IPC_MESSAGE_CONTROL5(CdmHostMsg_CreateSessionAndGenerateRequest, | 73 IPC_MESSAGE_CONTROL5(CdmHostMsg_CreateSessionAndGenerateRequest, |
54 int /* render_frame_id */, | 74 int /* render_frame_id */, |
55 int /* cdm_id */, | 75 int /* cdm_id */, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 int /* cdm_id */, | 133 int /* cdm_id */, |
114 uint32_t /* promise_id */, | 134 uint32_t /* promise_id */, |
115 std::string /* session_id */) | 135 std::string /* session_id */) |
116 | 136 |
117 IPC_MESSAGE_ROUTED5(CdmMsg_RejectPromise, | 137 IPC_MESSAGE_ROUTED5(CdmMsg_RejectPromise, |
118 int /* cdm_id */, | 138 int /* cdm_id */, |
119 uint32_t /* promise_id */, | 139 uint32_t /* promise_id */, |
120 media::MediaKeys::Exception /* exception */, | 140 media::MediaKeys::Exception /* exception */, |
121 uint32_t /* system_code */, | 141 uint32_t /* system_code */, |
122 std::string /* error_message */) | 142 std::string /* error_message */) |
OLD | NEW |