| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |