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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Minor refactor. Created 4 years, 2 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: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 6f0950ee21f02f21eb09159fc1c96a336dc1c3a6..9e4e81faa586af70f63a82f895520b88f46ba05c 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -41,6 +41,7 @@
#include "chrome/renderer/chrome_render_thread_observer.h"
#include "chrome/renderer/chrome_render_view_observer.h"
#include "chrome/renderer/content_settings_observer.h"
+#include "chrome/renderer/installation_service_impl.h"
#include "chrome/renderer/loadtimes_extension_bindings.h"
#include "chrome/renderer/media/chrome_key_systems.h"
#include "chrome/renderer/net/net_error_helper.h"
@@ -97,6 +98,7 @@
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/shared_impl/ppapi_switches.h"
#include "services/shell/public/cpp/interface_provider.h"
+#include "services/shell/public/cpp/interface_registry.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebCachePolicy.h"
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
@@ -490,6 +492,10 @@ void ChromeContentRendererClient::RenderFrameCreated(
new dom_distiller::DistillerJsRenderFrameObserver(
render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL);
+ // Create a mojo service for receiving installation events.
+ render_frame->GetInterfaceRegistry()->AddInterface(
+ base::Bind(&InstallationServiceImpl::Create, render_frame));
+
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kEnableDistillabilityService)) {
// Create DistillabilityAgent to send distillability updates to

Powered by Google App Engine
This is Rietveld 408576698