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

Side by Side 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: Move dependencies to correct files Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/DEPS ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/metrics/user_metrics_action.h" 12 #include "base/metrics/user_metrics_action.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/common/channel_info.h" 17 #include "chrome/common/channel_info.h"
18 #include "chrome/common/chrome_isolated_world_ids.h"
18 #include "chrome/common/chrome_paths.h" 19 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/crash_keys.h" 21 #include "chrome/common/crash_keys.h"
21 #include "chrome/common/extensions/extension_metrics.h" 22 #include "chrome/common/extensions/extension_metrics.h"
22 #include "chrome/common/localized_error.h" 23 #include "chrome/common/localized_error.h"
23 #include "chrome/common/pepper_permission_util.h" 24 #include "chrome/common/pepper_permission_util.h"
24 #include "chrome/common/render_messages.h" 25 #include "chrome/common/render_messages.h"
25 #include "chrome/common/secure_origin_whitelist.h" 26 #include "chrome/common/secure_origin_whitelist.h"
26 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
27 #include "chrome/grit/generated_resources.h" 28 #include "chrome/grit/generated_resources.h"
(...skipping 23 matching lines...) Expand all
51 #include "chrome/renderer/searchbox/search_bouncer.h" 52 #include "chrome/renderer/searchbox/search_bouncer.h"
52 #include "chrome/renderer/searchbox/searchbox.h" 53 #include "chrome/renderer/searchbox/searchbox.h"
53 #include "chrome/renderer/searchbox/searchbox_extension.h" 54 #include "chrome/renderer/searchbox/searchbox_extension.h"
54 #include "chrome/renderer/tts_dispatcher.h" 55 #include "chrome/renderer/tts_dispatcher.h"
55 #include "chrome/renderer/worker_content_settings_client_proxy.h" 56 #include "chrome/renderer/worker_content_settings_client_proxy.h"
56 #include "components/autofill/content/renderer/autofill_agent.h" 57 #include "components/autofill/content/renderer/autofill_agent.h"
57 #include "components/autofill/content/renderer/password_autofill_agent.h" 58 #include "components/autofill/content/renderer/password_autofill_agent.h"
58 #include "components/autofill/content/renderer/password_generation_agent.h" 59 #include "components/autofill/content/renderer/password_generation_agent.h"
59 #include "components/content_settings/core/common/content_settings_pattern.h" 60 #include "components/content_settings/core/common/content_settings_pattern.h"
60 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" 61 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h"
62 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h"
61 #include "components/dom_distiller/core/url_constants.h" 63 #include "components/dom_distiller/core/url_constants.h"
62 #include "components/nacl/renderer/ppb_nacl_private.h" 64 #include "components/nacl/renderer/ppb_nacl_private.h"
63 #include "components/nacl/renderer/ppb_nacl_private_impl.h" 65 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
64 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" 66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
65 #include "components/password_manager/content/renderer/credential_manager_client .h" 67 #include "components/password_manager/content/renderer/credential_manager_client .h"
66 #include "components/pdf/renderer/pepper_pdf_host.h" 68 #include "components/pdf/renderer/pepper_pdf_host.h"
67 #include "components/plugins/renderer/mobile_youtube_plugin.h" 69 #include "components/plugins/renderer/mobile_youtube_plugin.h"
68 #include "components/signin/core/common/profile_management_switches.h" 70 #include "components/signin/core/common/profile_management_switches.h"
69 #include "components/version_info/version_info.h" 71 #include "components/version_info/version_info.h"
70 #include "components/visitedlink/renderer/visitedlink_slave.h" 72 #include "components/visitedlink/renderer/visitedlink_slave.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 new prerender::PrerenderHelper(render_frame); 557 new prerender::PrerenderHelper(render_frame);
556 } 558 }
557 } 559 }
558 560
559 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) { 561 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) {
560 // Only attach NetErrorHelper to the main frame, since only the main frame 562 // Only attach NetErrorHelper to the main frame, since only the main frame
561 // should get error pages. 563 // should get error pages.
562 new NetErrorHelper(render_frame); 564 new NetErrorHelper(render_frame);
563 } 565 }
564 566
567 // Set up a mojo service to test if this page is a distiller page.
568 new dom_distiller::DistillerJsRenderFrameObserver(
569 render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL);
570
565 PasswordAutofillAgent* password_autofill_agent = 571 PasswordAutofillAgent* password_autofill_agent =
566 new PasswordAutofillAgent(render_frame); 572 new PasswordAutofillAgent(render_frame);
567 PasswordGenerationAgent* password_generation_agent = 573 PasswordGenerationAgent* password_generation_agent =
568 new PasswordGenerationAgent(render_frame, password_autofill_agent); 574 new PasswordGenerationAgent(render_frame, password_autofill_agent);
569 new AutofillAgent(render_frame, password_autofill_agent, 575 new AutofillAgent(render_frame, password_autofill_agent,
570 password_generation_agent); 576 password_generation_agent);
571 } 577 }
572 578
573 void ChromeContentRendererClient::RenderViewCreated( 579 void ChromeContentRendererClient::RenderViewCreated(
574 content::RenderView* render_view) { 580 content::RenderView* render_view) {
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 context, url); 1648 context, url);
1643 #endif 1649 #endif
1644 } 1650 }
1645 1651
1646 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( 1652 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread(
1647 const GURL& url) { 1653 const GURL& url) {
1648 #if defined(ENABLE_EXTENSIONS) 1654 #if defined(ENABLE_EXTENSIONS)
1649 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(url); 1655 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(url);
1650 #endif 1656 #endif
1651 } 1657 }
OLDNEW
« no previous file with comments | « chrome/renderer/DEPS ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698