| Index: third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.cpp
|
| diff --git a/third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.cpp b/third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e1a905119eb42702fd2f1fe86385af4d39885cc7
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/payments/HTMLIFrameElementPayments.cpp
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "modules/payments/HTMLIFrameElementPayments.h"
|
| +
|
| +#include "core/dom/QualifiedName.h"
|
| +#include "core/html/HTMLIFrameElement.h"
|
| +
|
| +namespace blink {
|
| +
|
| +HTMLIFrameElementPayments::HTMLIFrameElementPayments() {}
|
| +
|
| +// static
|
| +const char* HTMLIFrameElementPayments::supplementName() {
|
| + return "HTMLIFrameElementPayments";
|
| +}
|
| +
|
| +// static
|
| +bool HTMLIFrameElementPayments::fastHasAttribute(
|
| + const QualifiedName& name,
|
| + const HTMLIFrameElement& element) {
|
| + DCHECK(name == HTMLNames::allowpaymentrequestAttr);
|
| + return element.fastHasAttribute(name);
|
| +}
|
| +
|
| +// static
|
| +void HTMLIFrameElementPayments::setBooleanAttribute(const QualifiedName& name,
|
| + HTMLIFrameElement& element,
|
| + bool value) {
|
| + DCHECK(name == HTMLNames::allowpaymentrequestAttr);
|
| + element.setBooleanAttribute(name, value);
|
| +}
|
| +
|
| +// static
|
| +HTMLIFrameElementPayments& HTMLIFrameElementPayments::from(
|
| + HTMLIFrameElement& iframe) {
|
| + HTMLIFrameElementPayments* supplement =
|
| + static_cast<HTMLIFrameElementPayments*>(
|
| + Supplement<HTMLIFrameElement>::from(iframe, supplementName()));
|
| + if (!supplement) {
|
| + supplement = new HTMLIFrameElementPayments();
|
| + provideTo(iframe, supplementName(), supplement);
|
| + }
|
| + return *supplement;
|
| +}
|
| +
|
| +DEFINE_TRACE(HTMLIFrameElementPayments) {
|
| + Supplement<HTMLIFrameElement>::trace(visitor);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|