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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1351313003: Revert "Revert of Expose distiller functions to JavaScript..." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/page_load_metrics/renderer/metrics_render_frame_observer.h" 67 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h"
66 #include "components/password_manager/content/renderer/credential_manager_client .h" 68 #include "components/password_manager/content/renderer/credential_manager_client .h"
67 #include "components/pdf/renderer/pepper_pdf_host.h" 69 #include "components/pdf/renderer/pepper_pdf_host.h"
68 #include "components/plugins/renderer/mobile_youtube_plugin.h" 70 #include "components/plugins/renderer/mobile_youtube_plugin.h"
69 #include "components/signin/core/common/profile_management_switches.h" 71 #include "components/signin/core/common/profile_management_switches.h"
70 #include "components/version_info/version_info.h" 72 #include "components/version_info/version_info.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // should get error pages. 566 // should get error pages.
565 new NetErrorHelper(render_frame); 567 new NetErrorHelper(render_frame);
566 } 568 }
567 569
568 if (render_frame->GetWebFrame()->parent() == nullptr) { 570 if (render_frame->GetWebFrame()->parent() == nullptr) {
569 // Only attach MainRenderFrameObserver to the main frame, since 571 // Only attach MainRenderFrameObserver to the main frame, since
570 // we only want to log page load metrics for the main frame. 572 // we only want to log page load metrics for the main frame.
571 new page_load_metrics::MetricsRenderFrameObserver(render_frame); 573 new page_load_metrics::MetricsRenderFrameObserver(render_frame);
572 } 574 }
573 575
576 // Set up a mojo service to test if this page is a distiller page.
577 new dom_distiller::DistillerJsRenderFrameObserver(
578 render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL);
579
574 PasswordAutofillAgent* password_autofill_agent = 580 PasswordAutofillAgent* password_autofill_agent =
575 new PasswordAutofillAgent(render_frame); 581 new PasswordAutofillAgent(render_frame);
576 PasswordGenerationAgent* password_generation_agent = 582 PasswordGenerationAgent* password_generation_agent =
577 new PasswordGenerationAgent(render_frame, password_autofill_agent); 583 new PasswordGenerationAgent(render_frame, password_autofill_agent);
578 new AutofillAgent(render_frame, password_autofill_agent, 584 new AutofillAgent(render_frame, password_autofill_agent,
579 password_generation_agent); 585 password_generation_agent);
580 } 586 }
581 587
582 void ChromeContentRendererClient::RenderViewCreated( 588 void ChromeContentRendererClient::RenderViewCreated(
583 content::RenderView* render_view) { 589 content::RenderView* render_view) {
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 } 1667 }
1662 1668
1663 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( 1669 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread(
1664 v8::Local<v8::Context> context, 1670 v8::Local<v8::Context> context,
1665 const GURL& url) { 1671 const GURL& url) {
1666 #if defined(ENABLE_EXTENSIONS) 1672 #if defined(ENABLE_EXTENSIONS)
1667 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(context, 1673 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(context,
1668 url); 1674 url);
1669 #endif 1675 #endif
1670 } 1676 }
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