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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2525813003: Mark IFrame support in PaymentRequest experimental (Closed)
Patch Set: Remove duplicate check Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index f67b63bede62e3795377d09323f5ff31669c1382..657b8590fc0bc3c6e90c35ce32a05f734164eeaf 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -29,6 +29,7 @@
#include "modules/payments/PaymentsValidators.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/wtf_array.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/mojo/MojoHelper.h"
#include "public/platform/InterfaceProvider.h"
#include "public/platform/Platform.h"
@@ -732,8 +733,10 @@ PaymentRequest::PaymentRequest(ScriptState* scriptState,
if (!allowedToUsePaymentRequest(scriptState->domWindow()->frame())) {
exceptionState.throwSecurityError(
- "Must be in a top-level browsing context or an iframe needs to specify "
- "'allowpaymentrequest' explicitly");
+ RuntimeEnabledFeatures::paymentRequestIFrameEnabled()
+ ? "Must be in a top-level browsing context or an iframe needs to "
+ "specify 'allowpaymentrequest' explicitly"
+ : "Must be in a top-level browsing context");
return;
}

Powered by Google App Engine
This is Rietveld 408576698