OLD | NEW |
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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "chrome/renderer/searchbox/search_bouncer.h" | 61 #include "chrome/renderer/searchbox/search_bouncer.h" |
62 #include "chrome/renderer/searchbox/searchbox.h" | 62 #include "chrome/renderer/searchbox/searchbox.h" |
63 #include "chrome/renderer/searchbox/searchbox_extension.h" | 63 #include "chrome/renderer/searchbox/searchbox_extension.h" |
64 #include "chrome/renderer/tts_dispatcher.h" | 64 #include "chrome/renderer/tts_dispatcher.h" |
65 #include "chrome/renderer/worker_content_settings_client.h" | 65 #include "chrome/renderer/worker_content_settings_client.h" |
66 #include "components/autofill/content/renderer/autofill_agent.h" | 66 #include "components/autofill/content/renderer/autofill_agent.h" |
67 #include "components/autofill/content/renderer/password_autofill_agent.h" | 67 #include "components/autofill/content/renderer/password_autofill_agent.h" |
68 #include "components/autofill/content/renderer/password_generation_agent.h" | 68 #include "components/autofill/content/renderer/password_generation_agent.h" |
69 #include "components/content_settings/core/common/content_settings_pattern.h" | 69 #include "components/content_settings/core/common/content_settings_pattern.h" |
70 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" | 70 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" |
| 71 #include "components/data_reduction_proxy/content/renderer/content_previews_rend
er_frame_observer.h" |
71 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" | 72 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" |
72 #include "components/dom_distiller/content/renderer/distillability_agent.h" | 73 #include "components/dom_distiller/content/renderer/distillability_agent.h" |
73 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" | 74 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" |
74 #include "components/dom_distiller/core/dom_distiller_switches.h" | 75 #include "components/dom_distiller/core/dom_distiller_switches.h" |
75 #include "components/dom_distiller/core/url_constants.h" | 76 #include "components/dom_distiller/core/url_constants.h" |
76 #include "components/error_page/common/error.h" | 77 #include "components/error_page/common/error.h" |
77 #include "components/error_page/common/localized_error.h" | 78 #include "components/error_page/common/localized_error.h" |
78 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 79 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
79 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 80 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
80 #include "components/pdf/renderer/pepper_pdf_host.h" | 81 #include "components/pdf/renderer/pepper_pdf_host.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 render_frame->IsMainFrame()) { | 606 render_frame->IsMainFrame()) { |
606 new SearchBox(render_frame); | 607 new SearchBox(render_frame); |
607 } | 608 } |
608 | 609 |
609 #if BUILDFLAG(ENABLE_SPELLCHECK) | 610 #if BUILDFLAG(ENABLE_SPELLCHECK) |
610 new SpellCheckProvider(render_frame, spellcheck_.get()); | 611 new SpellCheckProvider(render_frame, spellcheck_.get()); |
611 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) | 612 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) |
612 new SpellCheckPanel(render_frame, registry); | 613 new SpellCheckPanel(render_frame, registry); |
613 #endif // BUILDFLAG(HAS_SPELLCHECK_PANEL) | 614 #endif // BUILDFLAG(HAS_SPELLCHECK_PANEL) |
614 #endif | 615 #endif |
| 616 |
| 617 if (render_frame->IsMainFrame()) |
| 618 new data_reduction_proxy::ContentPreviewsRenderFrameObserver(render_frame); |
615 } | 619 } |
616 | 620 |
617 void ChromeContentRendererClient::RenderViewCreated( | 621 void ChromeContentRendererClient::RenderViewCreated( |
618 content::RenderView* render_view) { | 622 content::RenderView* render_view) { |
619 #if BUILDFLAG(ENABLE_EXTENSIONS) | 623 #if BUILDFLAG(ENABLE_EXTENSIONS) |
620 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); | 624 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); |
621 #endif | 625 #endif |
622 | 626 |
623 #if BUILDFLAG(ENABLE_SPELLCHECK) | 627 #if BUILDFLAG(ENABLE_SPELLCHECK) |
624 // This is a workaround keeping the behavior that, the Blink side spellcheck | 628 // This is a workaround keeping the behavior that, the Blink side spellcheck |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 return task_scheduler_util:: | 1660 return task_scheduler_util:: |
1657 GetRendererTaskSchedulerInitParamsFromCommandLine(); | 1661 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
1658 } | 1662 } |
1659 | 1663 |
1660 void ChromeContentRendererClient::InitSafeBrowsingIfNecessary() { | 1664 void ChromeContentRendererClient::InitSafeBrowsingIfNecessary() { |
1661 if (safe_browsing_) | 1665 if (safe_browsing_) |
1662 return; | 1666 return; |
1663 RenderThread::Get()->GetConnector()->BindInterface( | 1667 RenderThread::Get()->GetConnector()->BindInterface( |
1664 content::mojom::kBrowserServiceName, &safe_browsing_); | 1668 content::mojom::kBrowserServiceName, &safe_browsing_); |
1665 } | 1669 } |
OLD | NEW |