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

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

Issue 2963913002: Factor DRP PreviewsState logic out of content (Closed)
Patch Set: dougarnett comments Created 3 years, 5 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
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 <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
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/localized_error.h" 77 #include "components/error_page/common/localized_error.h"
77 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" 78 #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
78 #include "components/password_manager/content/renderer/credential_manager_client .h" 79 #include "components/password_manager/content/renderer/credential_manager_client .h"
79 #include "components/pdf/renderer/pepper_pdf_host.h" 80 #include "components/pdf/renderer/pepper_pdf_host.h"
80 #include "components/safe_browsing/renderer/threat_dom_details.h" 81 #include "components/safe_browsing/renderer/threat_dom_details.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 render_frame->IsMainFrame()) { 586 render_frame->IsMainFrame()) {
586 new SearchBox(render_frame); 587 new SearchBox(render_frame);
587 } 588 }
588 589
589 #if BUILDFLAG(ENABLE_SPELLCHECK) 590 #if BUILDFLAG(ENABLE_SPELLCHECK)
590 new SpellCheckProvider(render_frame, spellcheck_.get()); 591 new SpellCheckProvider(render_frame, spellcheck_.get());
591 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) 592 #if BUILDFLAG(HAS_SPELLCHECK_PANEL)
592 new SpellCheckPanel(render_frame); 593 new SpellCheckPanel(render_frame);
593 #endif // BUILDFLAG(HAS_SPELLCHECK_PANEL) 594 #endif // BUILDFLAG(HAS_SPELLCHECK_PANEL)
594 #endif 595 #endif
596
597 if (render_frame->IsMainFrame())
598 new data_reduction_proxy::ContentPreviewsRenderFrameObserver(render_frame);
595 } 599 }
596 600
597 void ChromeContentRendererClient::RenderViewCreated( 601 void ChromeContentRendererClient::RenderViewCreated(
598 content::RenderView* render_view) { 602 content::RenderView* render_view) {
599 #if BUILDFLAG(ENABLE_EXTENSIONS) 603 #if BUILDFLAG(ENABLE_EXTENSIONS)
600 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); 604 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view);
601 #endif 605 #endif
602 606
603 #if BUILDFLAG(ENABLE_SPELLCHECK) 607 #if BUILDFLAG(ENABLE_SPELLCHECK)
604 // This is a workaround keeping the behavior that, the Blink side spellcheck 608 // This is a workaround keeping the behavior that, the Blink side spellcheck
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 if (safe_browsing_) 1613 if (safe_browsing_)
1610 return true; 1614 return true;
1611 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 1615 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
1612 switches::kEnableNetworkService)) { 1616 switches::kEnableNetworkService)) {
1613 return false; 1617 return false;
1614 } 1618 }
1615 RenderThread::Get()->GetConnector()->BindInterface( 1619 RenderThread::Get()->GetConnector()->BindInterface(
1616 content::mojom::kBrowserServiceName, &safe_browsing_); 1620 content::mojom::kBrowserServiceName, &safe_browsing_);
1617 return true; 1621 return true;
1618 } 1622 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698