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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1231083007: Expose distiller functions to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-content
Patch Set: Comment for test util Created 5 years, 4 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 cfb68bf1308749ea7256b5468f71e29d27643311..c85ffe4498e7d826c4da4795fd86787349248000 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -15,6 +15,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/channel_info.h"
+#include "chrome/common/chrome_isolated_world_ids.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/crash_keys.h"
@@ -60,6 +61,7 @@
#include "components/autofill/content/renderer/password_generation_agent.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
+#include "components/dom_distiller/content/renderer/distiller_js_render_frame_observer.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/nacl/renderer/ppb_nacl_private.h"
#include "components/nacl/renderer/ppb_nacl_private_impl.h"
@@ -559,6 +561,10 @@ void ChromeContentRendererClient::RenderFrameCreated(
new NetErrorHelper(render_frame);
}
+ // Set up a mojo service to test if this page is a distiller page.
+ new dom_distiller::DistillerJsRenderFrameObserver(
+ render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL);
+
PasswordAutofillAgent* password_autofill_agent =
new PasswordAutofillAgent(render_frame);
PasswordGenerationAgent* password_generation_agent =

Powered by Google App Engine
This is Rietveld 408576698