Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: chrome/common/encrypted_media_messages_android.h

Issue 23513055: Populate canPlayType to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing commnets Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/encrypted_media_messages_android.h
diff --git a/chrome/common/encrypted_media_messages_android.h b/chrome/common/encrypted_media_messages_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..39c0ddf7a21cfaa52d0559d087d258c639ea4293
--- /dev/null
+++ b/chrome/common/encrypted_media_messages_android.h
@@ -0,0 +1,76 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// IPC messages for EME on android.
+// Multiply-included message file, hence no include guard.
+
+#include <vector>
+
+#include "ipc/ipc_message_macros.h"
+
+// Singly-included section for enums and custom IPC traits.
+#ifndef CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H
+#define CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H
+
+namespace android {
+
+// Defines bitmask values used to specify supported codecs.
+// Each value represents a codec within a specific container.
+enum SupportedCodecs {
+ NO_SUPPORTED_CODECS = 0,
+ WEBM_VP8_AND_VORBIS = 1 << 0,
+ MP4_AAC = 1 << 1,
+ MP4_AVC1 = 1 << 2,
+};
+
+struct SupportedKeySystemRequest {
jam 2013/09/19 15:32:14 sorry I just happened to see this. there's no need
qinmin 2013/09/19 16:11:19 Thanks, jam, will follow up on that. On 2013/09/1
+ SupportedKeySystemRequest();
+ ~SupportedKeySystemRequest();
+
+ // Key system UUID.
+ std::vector<uint8> uuid;
+ // Bitmask of requested codecs.
+ SupportedCodecs codecs;
+};
+
+struct SupportedKeySystemResponse {
+ SupportedKeySystemResponse();
+ ~SupportedKeySystemResponse();
+
+ // Key system UUID.
+ std::vector<uint8> uuid;
+ // Bitmask of supported compositing codecs.
+ SupportedCodecs compositing_codecs;
+ // Bitmask of supported non-compositing codecs.
+ SupportedCodecs non_compositing_codecs;
+};
+
+} // namespace android
+
+#endif // CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H
+
+
+#define IPC_MESSAGE_START EncryptedMediaMsgStart
+
+IPC_ENUM_TRAITS(android::SupportedCodecs)
+
+IPC_STRUCT_TRAITS_BEGIN(android::SupportedKeySystemRequest)
+ IPC_STRUCT_TRAITS_MEMBER(uuid)
+ IPC_STRUCT_TRAITS_MEMBER(codecs)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(android::SupportedKeySystemResponse)
+ IPC_STRUCT_TRAITS_MEMBER(uuid)
+ IPC_STRUCT_TRAITS_MEMBER(compositing_codecs)
+ IPC_STRUCT_TRAITS_MEMBER(non_compositing_codecs)
+IPC_STRUCT_TRAITS_END()
+
+
+// Messages sent from the renderer to the browser.
+
+// Synchronously get a list of supported EME key systems.
+IPC_SYNC_MESSAGE_CONTROL1_1(
+ ChromeViewHostMsg_GetSupportedKeySystems,
+ android::SupportedKeySystemRequest /* key system information request */,
+ android::SupportedKeySystemResponse /* key system information response */)

Powered by Google App Engine
This is Rietveld 408576698