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

Unified Diff: content/public/common/media_metadata.h

Issue 1515623002: Media Session: passing metadata from renderer/ to browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session_ipc
Patch Set: semicolon Created 4 years, 11 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
« no previous file with comments | « content/content_common.gypi ('k') | content/public/common/media_metadata.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/media_metadata.h
diff --git a/content/public/common/media_metadata.h b/content/public/common/media_metadata.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d7f13c59366caac20a29ed98b79c0d8a8478d58
--- /dev/null
+++ b/content/public/common/media_metadata.h
@@ -0,0 +1,40 @@
+// Copyright 2016 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_PUBLIC_COMMON_MEDIA_METADATA_H_
+#define CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_
+
+#include "base/strings/string16.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+// The MediaMetadata is a structure carrying information associated to a
+// content::MediaSession.
+struct CONTENT_EXPORT MediaMetadata {
+ MediaMetadata();
+ ~MediaMetadata();
+
+ bool operator==(const MediaMetadata& other) const;
+ bool operator!=(const MediaMetadata& other) const;
+
+ // Title associated to the MediaSession.
+ base::string16 title;
+
+ // Artist associated to the MediaSession.
+ base::string16 artist;
+
+ // Album associated to the MediaSession.
+ base::string16 album;
+
+ // Maximum length for all the strings inside the MediaMetadata when it is sent
+ // over IPC. The renderer process should truncate the strings before sending
+ // the MediaMetadata and the browser process must do the same when receiving
+ // it.
+ static const size_t kMaxIPCStringLength;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_
« no previous file with comments | « content/content_common.gypi ('k') | content/public/common/media_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698