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

Side by Side Diff: third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.cpp

Issue 2597193003: Enable iframe support for web payments by default. (Closed)
Patch Set: allowpaymentrequest attribute available only if PR is enabled 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.idl » ('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 #include "modules/payments/HTMLIFrameElementPayments.h" 5 #include "modules/payments/HTMLIFrameElementPayments.h"
6 6
7 #include "core/dom/QualifiedName.h" 7 #include "core/dom/QualifiedName.h"
8 #include "core/html/HTMLIFrameElement.h" 8 #include "core/html/HTMLIFrameElement.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (!supplement) { 42 if (!supplement) {
43 supplement = new HTMLIFrameElementPayments(); 43 supplement = new HTMLIFrameElementPayments();
44 provideTo(iframe, supplementName(), supplement); 44 provideTo(iframe, supplementName(), supplement);
45 } 45 }
46 return *supplement; 46 return *supplement;
47 } 47 }
48 48
49 // static 49 // static
50 bool HTMLIFrameElementPayments::allowPaymentRequest( 50 bool HTMLIFrameElementPayments::allowPaymentRequest(
51 HTMLIFrameElement& element) { 51 HTMLIFrameElement& element) {
52 return RuntimeEnabledFeatures::paymentRequestIFrameEnabled() && 52 return RuntimeEnabledFeatures::paymentRequestEnabled() &&
53 element.fastHasAttribute(HTMLNames::allowpaymentrequestAttr); 53 element.fastHasAttribute(HTMLNames::allowpaymentrequestAttr);
54 } 54 }
55 55
56 DEFINE_TRACE(HTMLIFrameElementPayments) { 56 DEFINE_TRACE(HTMLIFrameElementPayments) {
57 Supplement<HTMLIFrameElement>::trace(visitor); 57 Supplement<HTMLIFrameElement>::trace(visitor);
58 } 58 }
59 59
60 } // namespace blink 60 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698