Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 323ee7d2a72cf2f6627d822403e6fe2c220f77ee..126837b5c681c5d60085fbc4a4f156f15e07a5c1 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -78,11 +78,13 @@ |
#include "content/common/site_isolation_policy.h" |
#include "content/common/view_messages.h" |
#include "content/common/worker_messages.h" |
+#include "content/public/common/connection_filter_impl.h" |
#include "content/public/common/content_constants.h" |
#include "content/public/common/content_features.h" |
#include "content/public/common/content_paths.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/renderer_preferences.h" |
+#include "content/public/common/service_manager_connection.h" |
#include "content/public/common/service_names.mojom.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/renderer/content_renderer_client.h" |
@@ -140,9 +142,9 @@ |
#include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
#include "net/base/url_util.h" |
#include "ppapi/features/features.h" |
+#include "services/service_manager/public/cpp/binder_registry.h" |
#include "services/service_manager/public/cpp/connector.h" |
#include "services/service_manager/public/cpp/interface_provider.h" |
-#include "services/service_manager/public/cpp/interface_registry.h" |
#include "services/ui/public/cpp/bitmap/child_shared_bitmap_manager.h" |
#include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
#include "services/ui/public/interfaces/constants.mojom.h" |
@@ -345,6 +347,7 @@ class FrameFactoryImpl : public mojom::FrameFactory { |
}; |
void CreateFrameFactory(mojom::FrameFactoryRequest request) { |
+ LOG(ERROR) << "CREATEFRAMEFACTORY"; |
Ken Rockot(use gerrit already)
2017/04/18 21:42:11
remove
|
mojo::MakeStrongBinding(base::MakeUnique<FrameFactoryImpl>(), |
std::move(request)); |
} |
@@ -690,11 +693,18 @@ void RenderThreadImpl::Init( |
} |
#endif |
- // Must be called before RenderThreadStarted() below. |
Ken Rockot(use gerrit already)
2017/04/18 21:42:11
I wish I could remember what this comment was refe
|
- StartServiceManagerConnection(); |
+ auto registry = base::MakeUnique<service_manager::BinderRegistry>(); |
+ registry->AddInterface(base::Bind(&CreateFrameFactory), |
+ base::ThreadTaskRunnerHandle::Get()); |
+ registry->AddInterface(base::Bind(&EmbeddedWorkerInstanceClientImpl::Create), |
+ base::ThreadTaskRunnerHandle::Get()); |
+ GetServiceManagerConnection()->AddConnectionFilter( |
+ base::MakeUnique<ConnectionFilterImpl>(std::move(registry))); |
GetContentClient()->renderer()->RenderThreadStarted(); |
+ StartServiceManagerConnection(); |
+ |
field_trial_syncer_.InitFieldTrialObserving( |
*base::CommandLine::ForCurrentProcess(), switches::kSingleProcess); |
@@ -858,13 +868,6 @@ void RenderThreadImpl::Init( |
base::DiscardableMemoryAllocator::SetInstance( |
discardable_shared_memory_manager_.get()); |
- GetContentClient()->renderer()->ExposeInterfacesToBrowser( |
- GetInterfaceRegistry()); |
- |
- GetInterfaceRegistry()->AddInterface(base::Bind(&CreateFrameFactory)); |
- GetInterfaceRegistry()->AddInterface( |
- base::Bind(&EmbeddedWorkerInstanceClientImpl::Create)); |
- |
GetConnector()->BindInterface(mojom::kBrowserServiceName, |
mojo::MakeRequest(&storage_partition_service_)); |