Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
Patch Set: . Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc
diff --git a/components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc b/components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc
index 1a3cef6a061e0c443821eea19d133eb91598123c..ac24a1f9d07cef9f3609545e97c18456fc37fc6f 100644
--- a/components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc
+++ b/components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc
@@ -9,8 +9,8 @@
#include "base/bind.h"
#include "components/dom_distiller/content/common/distiller_page_notifier_service.mojom.h"
#include "components/dom_distiller/content/renderer/distiller_page_notifier_service_impl.h"
-#include "content/public/common/service_registry.h"
#include "content/public/renderer/render_frame.h"
+#include "services/shell/public/cpp/interface_registry.h"
#include "v8/include/v8.h"
namespace dom_distiller {
@@ -26,7 +26,7 @@ DistillerJsRenderFrameObserver::DistillerJsRenderFrameObserver(
DistillerJsRenderFrameObserver::~DistillerJsRenderFrameObserver() {}
void DistillerJsRenderFrameObserver::DidStartProvisionalLoad() {
- RegisterMojoService();
+ RegisterMojoInterface();
}
void DistillerJsRenderFrameObserver::DidFinishLoad() {
@@ -34,8 +34,8 @@ void DistillerJsRenderFrameObserver::DidFinishLoad() {
// will not be one; remove the mojom::DistillerPageNotifierService from the
// registry.
render_frame()
- ->GetServiceRegistry()
- ->RemoveService<mojom::DistillerPageNotifierService>();
+ ->GetInterfaceRegistry()
+ ->RemoveInterface<mojom::DistillerPageNotifierService>();
}
void DistillerJsRenderFrameObserver::DidCreateScriptContext(
@@ -51,8 +51,8 @@ void DistillerJsRenderFrameObserver::DidCreateScriptContext(
native_javascript_handle_->AddJavaScriptObjectToFrame(context);
}
-void DistillerJsRenderFrameObserver::RegisterMojoService() {
- render_frame()->GetServiceRegistry()->AddService(base::Bind(
+void DistillerJsRenderFrameObserver::RegisterMojoInterface() {
+ render_frame()->GetInterfaceRegistry()->AddInterface(base::Bind(
&DistillerJsRenderFrameObserver::CreateDistillerPageNotifierService,
weak_factory_.GetWeakPtr()));
}

Powered by Google App Engine
This is Rietveld 408576698