| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 5c20fc0035923a1b364d4acfdbfb1dfc5b0d782f..d6d47ba97cf60a6a8dd54ded2a4cb5dfb1b00f43 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -57,6 +57,7 @@
|
| #include "chrome/browser/notifications/platform_notification_service_impl.h"
|
| #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h"
|
| #include "chrome/browser/password_manager/chrome_password_manager_client.h"
|
| +#include "chrome/browser/payments/payment_request_impl.h"
|
| #include "chrome/browser/permissions/permission_context_base.h"
|
| #include "chrome/browser/platform_util.h"
|
| #include "chrome/browser/prerender/prerender_final_status.h"
|
| @@ -1437,6 +1438,15 @@ bool IsAutoReloadVisibleOnlyEnabled() {
|
| return true;
|
| }
|
|
|
| +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
|
| +bool AreExperimentalWebPlatformFeaturesEnabled() {
|
| + const base::CommandLine& browser_command_line =
|
| + *base::CommandLine::ForCurrentProcess();
|
| + return browser_command_line.HasSwitch(
|
| + switches::kEnableExperimentalWebPlatformFeatures);
|
| +}
|
| +#endif
|
| +
|
| void MaybeAppendBlinkSettingsSwitchForFieldTrial(
|
| const base::CommandLine& browser_command_line,
|
| base::CommandLine* command_line) {
|
| @@ -3004,6 +3014,15 @@ void ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces(
|
| base::Bind(&ForwardShareServiceRequest,
|
| web_contents->GetJavaInterfaces()->GetWeakPtr()));
|
| }
|
| +#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
|
| + if (AreExperimentalWebPlatformFeaturesEnabled()) {
|
| + content::WebContents* web_contents =
|
| + content::WebContents::FromRenderFrameHost(render_frame_host);
|
| + if (web_contents) {
|
| + registry->AddInterface(
|
| + base::Bind(CreatePaymentRequestHandler, web_contents));
|
| + }
|
| + }
|
| #endif
|
| }
|
|
|
|
|