1 // Copyright 2013 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. 4 5 // IPC messages for EME on android. 6 // Multiply-included message file, hence no include guard. 7 8 #include <vector> 9 10 #include "ipc/ipc_message_macros.h" 11 12 // Singly-included section for enums and custom IPC traits. 13 #ifndef CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H 14 #define CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H 15 16 namespace android { 17 18 // Defines bitmask values used to specify supported codecs. 19 // Each value represents a codec within a specific container. 20 enum SupportedCodecs { 21 NO_SUPPORTED_CODECS = 0, 22 WEBM_VP8_AND_VORBIS = 1 << 0, 23 MP4_AAC = 1 << 1, 24 MP4_AVC1 = 1 << 2, 25 }; 26 27 } // namespace android 28 29 #endif // CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H 30 31 32 #define IPC_MESSAGE_START EncryptedMediaMsgStart 33 34 IPC_ENUM_TRAITS(android::SupportedCodecs) 35 36 IPC_STRUCT_BEGIN(SupportedKeySystemRequest) 37 IPC_STRUCT_MEMBER(std::vector<uint8>, uuid) 38 IPC_STRUCT_MEMBER(android::SupportedCodecs, codecs, 39 android::NO_SUPPORTED_CODECS) 40 IPC_STRUCT_END() 41 42 IPC_STRUCT_BEGIN(SupportedKeySystemResponse) 43 IPC_STRUCT_MEMBER(std::vector<uint8>, uuid) 44 IPC_STRUCT_MEMBER(android::SupportedCodecs, compositing_codecs, 45 android::NO_SUPPORTED_CODECS) 46 IPC_STRUCT_MEMBER(android::SupportedCodecs, non_compositing_codecs, 47 android::NO_SUPPORTED_CODECS) 48 IPC_STRUCT_END() 49 50 // Messages sent from the renderer to the browser. 51 52 // Synchronously get a list of supported EME key systems. 53 IPC_SYNC_MESSAGE_CONTROL1_1( 54 ChromeViewHostMsg_GetSupportedKeySystems, 55 SupportedKeySystemRequest /* key system information request */, 56 SupportedKeySystemResponse /* key system information response */) 57