Chromium Code Reviews| 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 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 HTMLIFrameElementPayments::HTMLIFrameElementPayments() {} | 13 HTMLIFrameElementPayments::HTMLIFrameElementPayments() {} |
| 13 | 14 |
| 14 // static | 15 // static |
| 15 const char* HTMLIFrameElementPayments::supplementName() { | 16 const char* HTMLIFrameElementPayments::supplementName() { |
| 16 return "HTMLIFrameElementPayments"; | 17 return "HTMLIFrameElementPayments"; |
| 17 } | 18 } |
| 18 | 19 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 41 if (!supplement) { | 42 if (!supplement) { |
| 42 supplement = new HTMLIFrameElementPayments(); | 43 supplement = new HTMLIFrameElementPayments(); |
| 43 provideTo(iframe, supplementName(), supplement); | 44 provideTo(iframe, supplementName(), supplement); |
| 44 } | 45 } |
| 45 return *supplement; | 46 return *supplement; |
| 46 } | 47 } |
| 47 | 48 |
| 48 // static | 49 // static |
| 49 bool HTMLIFrameElementPayments::allowPaymentRequest( | 50 bool HTMLIFrameElementPayments::allowPaymentRequest( |
| 50 HTMLIFrameElement& element) { | 51 HTMLIFrameElement& element) { |
| 51 return element.fastHasAttribute(HTMLNames::allowpaymentrequestAttr); | 52 return RuntimeEnabledFeatures::paymentRequestIFrameEnabled() && |
|
Rick Byers
2016/11/23 16:56:43
It seems like it would be nice if the bindings gen
please use gerrit instead
2016/11/23 17:27:36
Acknowledged.
| |
| 53 element.fastHasAttribute(HTMLNames::allowpaymentrequestAttr); | |
| 52 } | 54 } |
| 53 | 55 |
| 54 DEFINE_TRACE(HTMLIFrameElementPayments) { | 56 DEFINE_TRACE(HTMLIFrameElementPayments) { |
| 55 Supplement<HTMLIFrameElement>::trace(visitor); | 57 Supplement<HTMLIFrameElement>::trace(visitor); |
| 56 } | 58 } |
| 57 | 59 |
| 58 } // namespace blink | 60 } // namespace blink |
| OLD | NEW |