Chromium Code Reviews| 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 19f94c6d392b27014d05468bd0366373e0207029..1340a4f3081b27062d51a7406a31cbfc41421457 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" |
| @@ -1405,6 +1406,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) { |
| @@ -2976,7 +2986,16 @@ void ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces( |
| web_contents->GetJavaInterfaces()->GetWeakPtr())); |
| } |
| #endif |
| - |
| +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) |
| + if (AreExperimentalWebPlatformFeaturesEnabled()) { |
|
please use gerrit instead
2016/11/04 21:58:12
nit: I think there's no need to explicitly check t
Kevin Bailey
2016/11/09 16:25:20
Mostly I was unsure about how reachable this servi
|
| + content::WebContents* web_contents = |
| + content::WebContents::FromRenderFrameHost(render_frame_host); |
| + if (web_contents) { |
| + registry->AddInterface(base::Bind(CreatePaymentRequestHandler, |
| + render_frame_host, web_contents)); |
| + } |
| + } |
| +#endif |
| #if defined(ENABLE_MEDIA_ROUTER) |
| registry->AddInterface( |
| base::Bind(&CastRemotingConnector::CreateRemoterFactory, |