summaryrefslogtreecommitdiffstats
path: root/content/common/media
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 23:37:57 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 23:37:57 +0000
commit33fdddfddcca933851c1a3044d0d881cd5455dfd (patch)
tree672494a9385b6b0fefa6bedd449ebcc7ba77bd42 /content/common/media
parent858ceda682777affb22d41ee99adedeac946431b (diff)
downloadchromium_src-33fdddfddcca933851c1a3044d0d881cd5455dfd.zip
chromium_src-33fdddfddcca933851c1a3044d0d881cd5455dfd.tar.gz
chromium_src-33fdddfddcca933851c1a3044d0d881cd5455dfd.tar.bz2
Encrypted Media: Separate CDM IPC messages from MediaPlayer messages.
TBR=cevans@chromium.org BUG=315312 Review URL: https://codereview.chromium.org/176263002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/media')
-rw-r--r--content/common/media/cdm_messages.h71
-rw-r--r--content/common/media/cdm_messages_enums.h14
-rw-r--r--content/common/media/media_player_messages_android.h60
-rw-r--r--content/common/media/media_player_messages_enums_android.h6
4 files changed, 85 insertions, 66 deletions
diff --git a/content/common/media/cdm_messages.h b/content/common/media/cdm_messages.h
new file mode 100644
index 0000000..83a77a5
--- /dev/null
+++ b/content/common/media/cdm_messages.h
@@ -0,0 +1,71 @@
+// Copyright 2014 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 content decryption module (CDM) implementation.
+// Multiply-included message file, hence no include guard.
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "content/common/content_export.h"
+#include "content/common/media/cdm_messages_enums.h"
+#include "ipc/ipc_message_macros.h"
+#include "media/base/media_keys.h"
+#include "url/gurl.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START CdmMsgStart
+
+IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
+IPC_ENUM_TRAITS(CdmHostMsg_CreateSession_Type)
+
+IPC_MESSAGE_ROUTED3(CdmHostMsg_InitializeCDM,
+ int /* media_keys_id */,
+ std::vector<uint8> /* uuid */,
+ GURL /* frame url */)
+
+IPC_MESSAGE_ROUTED4(CdmHostMsg_CreateSession,
+ int /* media_keys_id */,
+ uint32_t /* session_id */,
+ CdmHostMsg_CreateSession_Type /* type */,
+ std::vector<uint8> /* init_data */)
+
+IPC_MESSAGE_ROUTED3(CdmHostMsg_UpdateSession,
+ int /* media_keys_id */,
+ uint32_t /* session_id */,
+ std::vector<uint8> /* response */)
+
+IPC_MESSAGE_ROUTED2(CdmHostMsg_ReleaseSession,
+ int /* media_keys_id */,
+ uint32_t /* session_id */)
+
+IPC_MESSAGE_ROUTED1(CdmHostMsg_DestroyCdm,
+ int /* media_keys_id */)
+
+IPC_MESSAGE_ROUTED3(CdmMsg_SessionCreated,
+ int /* media_keys_id */,
+ uint32_t /* session_id */,
+ std::string /* web_session_id */)
+
+IPC_MESSAGE_ROUTED4(CdmMsg_SessionMessage,
+ int /* media_keys_id */,
+ uint32_t /* session_id */,
+ std::vector<uint8> /* message */,
+ GURL /* destination_url */)
+
+IPC_MESSAGE_ROUTED2(CdmMsg_SessionReady,
+ int /* media_keys_id */,
+ uint32_t /* session_id */)
+
+IPC_MESSAGE_ROUTED2(CdmMsg_SessionClosed,
+ int /* media_keys_id */,
+ uint32_t /* session_id */)
+
+IPC_MESSAGE_ROUTED4(CdmMsg_SessionError,
+ int /* media_keys_id */,
+ uint32_t /* session_id */,
+ media::MediaKeys::KeyError /* error_code */,
+ int /* system_code */)
diff --git a/content/common/media/cdm_messages_enums.h b/content/common/media/cdm_messages_enums.h
new file mode 100644
index 0000000..93a6c47
--- /dev/null
+++ b/content/common/media/cdm_messages_enums.h
@@ -0,0 +1,14 @@
+// Copyright 2014 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.
+
+#ifndef CONTENT_COMMON_MEDIA_CDM_MESSAGES_ENUMS_H_
+#define CONTENT_COMMON_MEDIA_CDM_MESSAGES_ENUMS_H_
+
+// Dictates the session type when an EME session is created.
+enum CdmHostMsg_CreateSession_Type {
+ CREATE_SESSION_TYPE_WEBM,
+ CREATE_SESSION_TYPE_MP4
+};
+
+#endif // CONTENT_COMMON_MEDIA_CDM_MESSAGES_ENUMS_H_
diff --git a/content/common/media/media_player_messages_android.h b/content/common/media/media_player_messages_android.h
index 07bc020..2b2b383 100644
--- a/content/common/media/media_player_messages_android.h
+++ b/content/common/media/media_player_messages_android.h
@@ -5,9 +5,6 @@
// IPC messages for android media player.
// Multiply-included message file, hence no include guard.
-#include <string>
-#include <vector>
-
#include "base/basictypes.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
@@ -15,7 +12,6 @@
#include "ipc/ipc_message_macros.h"
#include "media/base/android/media_player_android.h"
#include "media/base/android/demuxer_stream_player_params.h"
-#include "media/base/media_keys.h"
#include "ui/gfx/rect_f.h"
#include "url/gurl.h"
@@ -280,59 +276,3 @@ IPC_MESSAGE_ROUTED3(MediaPlayerHostMsg_NotifyExternalSurface,
bool /* is_request */,
gfx::RectF /* rect */)
#endif // defined(VIDEO_HOLE)
-
-// Messages for encrypted media extensions API ------------------------------
-// TODO(xhwang): Move the following messages to a separate file.
-#undef IPC_MESSAGE_START
-#define IPC_MESSAGE_START CdmMsgStart
-
-IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
-IPC_ENUM_TRAITS(CdmHostMsg_CreateSession_Type)
-
-IPC_MESSAGE_ROUTED3(CdmHostMsg_InitializeCDM,
- int /* media_keys_id */,
- std::vector<uint8> /* uuid */,
- GURL /* frame url */)
-
-IPC_MESSAGE_ROUTED4(CdmHostMsg_CreateSession,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- CdmHostMsg_CreateSession_Type /* type */,
- std::vector<uint8> /* init_data */)
-
-IPC_MESSAGE_ROUTED3(CdmHostMsg_UpdateSession,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::vector<uint8> /* response */)
-
-IPC_MESSAGE_ROUTED2(CdmHostMsg_ReleaseSession,
- int /* media_keys_id */,
- uint32_t /* session_id */)
-
-IPC_MESSAGE_ROUTED1(CdmHostMsg_DestroyCdm,
- int /* media_keys_id */)
-
-IPC_MESSAGE_ROUTED3(CdmMsg_SessionCreated,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::string /* web_session_id */)
-
-IPC_MESSAGE_ROUTED4(CdmMsg_SessionMessage,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::vector<uint8> /* message */,
- GURL /* destination_url */)
-
-IPC_MESSAGE_ROUTED2(CdmMsg_SessionReady,
- int /* media_keys_id */,
- uint32_t /* session_id */)
-
-IPC_MESSAGE_ROUTED2(CdmMsg_SessionClosed,
- int /* media_keys_id */,
- uint32_t /* session_id */)
-
-IPC_MESSAGE_ROUTED4(CdmMsg_SessionError,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- media::MediaKeys::KeyError /* error_code */,
- int /* system_code */)
diff --git a/content/common/media/media_player_messages_enums_android.h b/content/common/media/media_player_messages_enums_android.h
index 3483d686..97818ff 100644
--- a/content/common/media/media_player_messages_enums_android.h
+++ b/content/common/media/media_player_messages_enums_android.h
@@ -11,10 +11,4 @@ enum MediaPlayerHostMsg_Initialize_Type {
MEDIA_PLAYER_TYPE_MEDIA_SOURCE,
};
-// Dictates the session type when an EME session is created.
-enum CdmHostMsg_CreateSession_Type {
- CREATE_SESSION_TYPE_WEBM,
- CREATE_SESSION_TYPE_MP4,
-};
-
#endif // CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_ANDROID_H_