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

Side by Side 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: cleanup Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_
jochen (gone - plz use gerrit) 2015/12/14 12:38:30 we is this in public, if you only use it from cont
mlamouri (slow - plz ping) 2016/01/05 16:01:16 This is going to be used by content embedders for
6 #define CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_
7
8 #include "base/strings/nullable_string16.h"
9 #include "content/common/content_export.h"
10
11 namespace content {
12
13 // The MediaMetadata is a structure carrying information associated to a
14 // content::MediaSession.
15 struct CONTENT_EXPORT MediaMetadata {
16 MediaMetadata();
jochen (gone - plz use gerrit) 2015/12/14 12:38:30 can you please add ctor args for all struct fields
mlamouri (slow - plz ping) 2016/01/05 16:01:17 I think the issue of such a ctor is that it would
17 ~MediaMetadata();
18
19 // Returns whether this instance of MediaMetadata had no attribute set.
20 // A newly created MediaMetadata is always empty.
21 bool IsEmpty() const;
22
23 // Title associated to the MediaSession.
24 base::NullableString16 title;
philipj_slow 2015/12/14 14:09:24 Rather than making every nullable, could we not us
mlamouri (slow - plz ping) 2016/01/05 16:01:17 Null will be used here to know whether a string wa
philipj_slow 2016/01/18 12:31:43 But the MediaMetadata interface assumes that "" is
mlamouri (slow - plz ping) 2016/01/19 14:20:09 Ok. Done.
25
26 // Artist associated to the MediaSession.
27 base::NullableString16 artist;
28
29 // Album associated to the MediaSession.
30 base::NullableString16 album;
31
32 // Maximum length for all the strings inside the MediaMetadata when it is sent
33 // over IPC. The renderer process should truncate the strings before sending
34 // the MediaMetadata and the browser process must do the same when receiving
35 // it.
36 static const size_t kMaxIPCStringLength = 4 * 1024;
jochen (gone - plz use gerrit) 2015/12/14 12:38:30 can you move the definition to the cc file please?
mlamouri (slow - plz ping) 2016/01/05 16:01:16 Sure. I thought that given that we are now allowed
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_PUBLIC_COMMON_MEDIA_METADATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698