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

Unified Diff: content/common/media/media_session_service_struct_traits.h

Issue 2367393002: Migrating MediaSession messages to mojo (Closed)
Patch Set: better type mapping (experimental, should move to a separate CL) Created 4 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: content/common/media/media_session_service_struct_traits.h
diff --git a/content/common/media/media_session_service_struct_traits.h b/content/common/media/media_session_service_struct_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..acd36cb4d17d984994dd48cecb4eaa31b816aade
--- /dev/null
+++ b/content/common/media/media_session_service_struct_traits.h
@@ -0,0 +1,30 @@
+// 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_COMMON_MEDIA_MEDIA_SESSION_SERVICE_STRUCT_TRAITS_H_
+#define CONTENT_COMMON_MEDIA_MEDIA_SESSION_SERVICE_STRUCT_TRAITS_H_
+
+#include "third_party/WebKit/public/platform/modules/mediasession/media_session.mojom.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<blink::mojom::MediaMetadataIcon,
+ content::MediaMetadata::Artwork> {
+ static url::mojom::Url& src(const content::MediaMetadata::Artwork& artwork) {
+ return artwork.src;
+ }
+
+ static mojo::common::mojom::NullableString16& type(
+ const content::MediaMetadata::Artwork& artwork) {
+ return artwork.type;
+ }
+
+ static mojo::
+}
+
+} // namespace mojo
+
+
mlamouri (slow - plz ping) 2016/09/29 10:26:40 style: one line too many?
Zhiqiang Zhang (Slow) 2016/09/30 19:56:15 Done.
+#endif // CONTENT_COMMON_MEDIA_MEDIA_SESSION_SERVICE_STRUCT_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698