Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc |
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
| index 75654d2822d81030745104737bd04d316b615cdb..af02052f4768eb416db55cb5da80244f48a35b02 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -54,6 +54,7 @@ |
| #include "content/browser/renderer_host/render_widget_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| #include "content/browser/shared_worker/shared_worker_service_impl.h" |
| +#include "content/browser/webshare/share_service_impl.h" |
| #include "content/browser/websockets/websocket_manager.h" |
| #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| #include "content/common/accessibility_messages.h" |
| @@ -82,6 +83,7 @@ |
| #include "content/public/browser/stream_handle.h" |
| #include "content/public/browser/user_metrics.h" |
| #include "content/public/common/browser_side_navigation_policy.h" |
| +#include "content/public/common/content_client.h" |
| #include "content/public/common/content_constants.h" |
| #include "content/public/common/content_features.h" |
| #include "content/public/common/content_switches.h" |
| @@ -89,6 +91,7 @@ |
| #include "content/public/common/file_chooser_params.h" |
| #include "content/public/common/form_field_data.h" |
| #include "content/public/common/isolated_world_ids.h" |
| +#include "content/public/common/origin_trial_policy.h" |
| #include "content/public/common/service_manager_connection.h" |
| #include "content/public/common/service_names.mojom.h" |
| #include "content/public/common/url_constants.h" |
| @@ -2293,6 +2296,13 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() { |
| GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( |
| GetInterfaceRegistry(), this); |
| + |
| +#if defined(OS_LINUX) || defined(OS_WIN) |
| + OriginTrialPolicy* otp = GetContentClient()->GetOriginTrialPolicy(); |
|
Matt Giuca
2016/12/13 06:06:08
nit: You could call this |policy| instead of |otp|
constantina
2016/12/13 06:09:55
Done.
|
| + if (!otp || !otp->IsFeatureDisabled("WebShare")) { |
| + GetInterfaceRegistry()->AddInterface(base::Bind(&ShareServiceImpl::Create)); |
| + } |
| +#endif |
| } |
| void RenderFrameHostImpl::ResetWaitingState() { |