Add testonly=true to components/pairing:unit_tests
[chromium-blink-merge.git] / content / common / media / cdm_messages.h
blobb0f7a8677bc214559591716b0a985e7b5496dbe8
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
3 // found in the LICENSE file.
5 // IPC messages for content decryption module (CDM) implementation.
6 // Multiply-included message file, hence no include guard.
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "content/common/content_export.h"
13 #include "content/common/media/cdm_messages_enums.h"
14 #include "ipc/ipc_message_macros.h"
15 #include "media/base/media_keys.h"
16 #include "url/gurl.h"
18 #undef IPC_MESSAGE_EXPORT
19 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
20 #define IPC_MESSAGE_START CdmMsgStart
22 IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
23 IPC_ENUM_TRAITS(CdmHostMsg_CreateSession_ContentType)
25 // Messages from render to browser.
27 IPC_MESSAGE_CONTROL4(CdmHostMsg_InitializeCdm,
28 int /* render_frame_id */,
29 int /* cdm_id */,
30 std::string /* key_system */,
31 GURL /* security_origin */)
33 IPC_MESSAGE_CONTROL5(CdmHostMsg_CreateSession,
34 int /* render_frame_id */,
35 int /* cdm_id */,
36 uint32_t /* session_id */,
37 CdmHostMsg_CreateSession_ContentType /* content_type */,
38 std::vector<uint8> /* init_data */)
40 IPC_MESSAGE_CONTROL4(CdmHostMsg_UpdateSession,
41 int /* render_frame_id */,
42 int /* cdm_id */,
43 uint32_t /* session_id */,
44 std::vector<uint8> /* response */)
46 IPC_MESSAGE_CONTROL3(CdmHostMsg_ReleaseSession,
47 int /* render_frame_id */,
48 int /* cdm_id */,
49 uint32_t /* session_id */)
51 IPC_MESSAGE_CONTROL2(CdmHostMsg_DestroyCdm,
52 int /* render_frame_id */,
53 int /* cdm_id */)
55 // Messages from browser to render.
57 IPC_MESSAGE_ROUTED3(CdmMsg_SessionCreated,
58 int /* cdm_id */,
59 uint32_t /* session_id */,
60 std::string /* web_session_id */)
62 IPC_MESSAGE_ROUTED4(CdmMsg_SessionMessage,
63 int /* cdm_id */,
64 uint32_t /* session_id */,
65 std::vector<uint8> /* message */,
66 GURL /* destination_url */)
68 IPC_MESSAGE_ROUTED2(CdmMsg_SessionReady,
69 int /* cdm_id */,
70 uint32_t /* session_id */)
72 IPC_MESSAGE_ROUTED2(CdmMsg_SessionClosed,
73 int /* cdm_id */,
74 uint32_t /* session_id */)
76 IPC_MESSAGE_ROUTED4(CdmMsg_SessionError,
77 int /* cdm_id */,
78 uint32_t /* session_id */,
79 media::MediaKeys::KeyError /* error_code */,
80 uint32_t /* system_code */)