Revert "Share a single ServiceRegistry for all render frames in a process."
This reverts commit ac2a36e6cdb4739bcba077ac90950831c49b3e15.
We can go back to using a per-frame ServiceRegistry because
MessagePipes are cheaper now.
[+ drive-by formatting of content/common/BUILD.gn]
BUG=557909
[email protected]
Review URL: https://codereview.chromium.org/1530333002
Cr-Commit-Position: refs/heads/master@{#365638}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 8f6f2e3..0f5878a 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -19,6 +19,7 @@
#include "base/process/process_handle.h"
#include "content/common/accessibility_mode_enums.h"
#include "content/common/frame_message_enums.h"
+#include "content/common/mojo/service_registry_impl.h"
#include "content/public/common/console_message_level.h"
#include "content/public/common/javascript_message_type.h"
#include "content/public/common/referrer.h"
@@ -130,7 +131,6 @@
class RenderWidget;
class RenderWidgetFullscreenPepper;
class ScreenOrientationDispatcher;
-class ServiceRegistry;
class UserMediaClientImpl;
class WakeLockDispatcher;
struct CommonNavigationParams;
@@ -619,6 +619,11 @@
// TODO(nasko): Remove this method once swapped out state is no longer used.
void NavigateToSwappedOutURL();
+ // Binds this render frame's service registry.
+ void BindServiceRegistry(
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services);
+
ManifestManager* manifest_manager();
// TODO(creis): Remove when the only caller, the HistoryController, is no
@@ -1110,11 +1115,7 @@
// initialized.
PresentationDispatcher* presentation_dispatcher_;
- scoped_ptr<ServiceRegistry> service_registry_;
-
- // Used to vend WeakPtrs to our ServiceRegistry.
- scoped_ptr<base::WeakPtrFactory<ServiceRegistry>>
- service_registry_weak_factory_;
+ ServiceRegistryImpl service_registry_;
// The shell proxy used to connect to Mojo applications.
mojo::ShellPtr mojo_shell_;