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

Side by Side Diff: content/public/common/referrer_struct_traits.h

Issue 2455543002: Convert PDF component IPC to mojo. (Closed)
Patch Set: Feedback Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « components/pdf/renderer/pepper_pdf_host.cc ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_REFERRER_STRUCT_TRAITS_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_REFERRER_STRUCT_TRAITS_H_
6 #define CONTENT_PUBLIC_COMMON_REFERRER_STRUCT_TRAITS_H_ 6 #define CONTENT_PUBLIC_COMMON_REFERRER_STRUCT_TRAITS_H_
7 7
8 #include "content/common/content_export.h"
8 #include "content/public/common/referrer.h" 9 #include "content/public/common/referrer.h"
9 #include "third_party/WebKit/public/platform/referrer.mojom.h" 10 #include "third_party/WebKit/public/platform/referrer.mojom.h"
10 11
11 namespace mojo { 12 namespace mojo {
12 13
13 template <> 14 template <>
14 struct StructTraits<::blink::mojom::ReferrerDataView, content::Referrer> { 15 struct CONTENT_EXPORT
16 StructTraits<::blink::mojom::ReferrerDataView, content::Referrer> {
15 static const GURL& url(const content::Referrer& r) { 17 static const GURL& url(const content::Referrer& r) {
16 return r.url; 18 return r.url;
17 } 19 }
18 20
19 static ::blink::WebReferrerPolicy policy(const content::Referrer& r) { 21 static ::blink::WebReferrerPolicy policy(const content::Referrer& r) {
20 return r.policy; 22 return r.policy;
21 } 23 }
22 24
23 static bool Read(::blink::mojom::ReferrerDataView data, 25 static bool Read(::blink::mojom::ReferrerDataView data,
24 content::Referrer* out); 26 content::Referrer* out);
25 }; 27 };
26 28
27 } 29 }
28 30
29 #endif // CONTENT_PUBLIC_COMMON_REFERRER_STRUCT_TRAITS_H_ 31 #endif // CONTENT_PUBLIC_COMMON_REFERRER_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « components/pdf/renderer/pepper_pdf_host.cc ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698