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

Side by Side Diff: content/common/frame_owner_properties.cc

Issue 2545693002: Support allowpaymentrequest with out-of-process iframes (Closed)
Patch Set: Support allowpaymentrequest with out-of-process iframes Created 4 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
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 #include "content/common/frame_owner_properties.h" 5 #include "content/common/frame_owner_properties.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 FrameOwnerProperties::FrameOwnerProperties() 9 FrameOwnerProperties::FrameOwnerProperties()
10 : scrolling_mode(blink::WebFrameOwnerProperties::ScrollingMode::Auto), 10 : scrolling_mode(blink::WebFrameOwnerProperties::ScrollingMode::Auto),
11 margin_width(-1), 11 margin_width(-1),
12 margin_height(-1), 12 margin_height(-1),
13 allow_fullscreen(false) {} 13 allow_fullscreen(false),
14 allow_payment_request(false) {}
14 15
15 FrameOwnerProperties::FrameOwnerProperties(const FrameOwnerProperties& other) = 16 FrameOwnerProperties::FrameOwnerProperties(const FrameOwnerProperties& other) =
16 default; 17 default;
17 18
18 FrameOwnerProperties::FrameOwnerProperties( 19 FrameOwnerProperties::FrameOwnerProperties(
19 const blink::WebFrameOwnerProperties& web_frame_owner_properties) 20 const blink::WebFrameOwnerProperties& web_frame_owner_properties)
20 : scrolling_mode(web_frame_owner_properties.scrollingMode), 21 : scrolling_mode(web_frame_owner_properties.scrollingMode),
21 margin_width(web_frame_owner_properties.marginWidth), 22 margin_width(web_frame_owner_properties.marginWidth),
22 margin_height(web_frame_owner_properties.marginHeight), 23 margin_height(web_frame_owner_properties.marginHeight),
23 allow_fullscreen(web_frame_owner_properties.allowFullscreen), 24 allow_fullscreen(web_frame_owner_properties.allowFullscreen),
25 allow_payment_request(web_frame_owner_properties.allowPaymentRequest),
24 required_csp(web_frame_owner_properties.requiredCsp.utf8()), 26 required_csp(web_frame_owner_properties.requiredCsp.utf8()),
25 delegated_permissions( 27 delegated_permissions(
26 web_frame_owner_properties.delegatedPermissions.begin(), 28 web_frame_owner_properties.delegatedPermissions.begin(),
27 web_frame_owner_properties.delegatedPermissions.end()) {} 29 web_frame_owner_properties.delegatedPermissions.end()) {}
28 30
29 FrameOwnerProperties::~FrameOwnerProperties() {} 31 FrameOwnerProperties::~FrameOwnerProperties() {}
30 32
31 blink::WebFrameOwnerProperties FrameOwnerProperties::ToWebFrameOwnerProperties() 33 blink::WebFrameOwnerProperties FrameOwnerProperties::ToWebFrameOwnerProperties()
32 const { 34 const {
33 blink::WebFrameOwnerProperties result; 35 blink::WebFrameOwnerProperties result;
34 36
35 result.scrollingMode = scrolling_mode; 37 result.scrollingMode = scrolling_mode;
36 result.marginWidth = margin_width; 38 result.marginWidth = margin_width;
37 result.marginHeight = margin_height; 39 result.marginHeight = margin_height;
38 result.allowFullscreen = allow_fullscreen; 40 result.allowFullscreen = allow_fullscreen;
41 result.allowPaymentRequest = allow_payment_request;
39 result.requiredCsp = blink::WebString::fromUTF8(required_csp); 42 result.requiredCsp = blink::WebString::fromUTF8(required_csp);
40 result.delegatedPermissions = 43 result.delegatedPermissions =
41 blink::WebVector<blink::WebPermissionType>(delegated_permissions); 44 blink::WebVector<blink::WebPermissionType>(delegated_permissions);
42 45
43 return result; 46 return result;
44 } 47 }
45 48
46 bool FrameOwnerProperties::operator==(const FrameOwnerProperties& other) const { 49 bool FrameOwnerProperties::operator==(const FrameOwnerProperties& other) const {
47 return scrolling_mode == other.scrolling_mode && 50 return scrolling_mode == other.scrolling_mode &&
48 margin_width == other.margin_width && 51 margin_width == other.margin_width &&
49 margin_height == other.margin_height && 52 margin_height == other.margin_height &&
50 allow_fullscreen == other.allow_fullscreen && 53 allow_fullscreen == other.allow_fullscreen &&
54 allow_payment_request == other.allow_payment_request &&
51 required_csp == other.required_csp && 55 required_csp == other.required_csp &&
52 std::equal(delegated_permissions.begin(), delegated_permissions.end(), 56 std::equal(delegated_permissions.begin(), delegated_permissions.end(),
53 other.delegated_permissions.begin()); 57 other.delegated_permissions.begin());
54 } 58 }
55 59
56 } // namespace content 60 } // namespace content
OLDNEW
« no previous file with comments | « content/common/frame_owner_properties.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698