Chromium Code Reviews| 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 "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" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 #include "chrome/renderer/searchbox/search_bouncer.h" | 53 #include "chrome/renderer/searchbox/search_bouncer.h" |
| 54 #include "chrome/renderer/searchbox/searchbox.h" | 54 #include "chrome/renderer/searchbox/searchbox.h" |
| 55 #include "chrome/renderer/searchbox/searchbox_extension.h" | 55 #include "chrome/renderer/searchbox/searchbox_extension.h" |
| 56 #include "chrome/renderer/tts_dispatcher.h" | 56 #include "chrome/renderer/tts_dispatcher.h" |
| 57 #include "chrome/renderer/worker_content_settings_client_proxy.h" | 57 #include "chrome/renderer/worker_content_settings_client_proxy.h" |
| 58 #include "components/autofill/content/renderer/autofill_agent.h" | 58 #include "components/autofill/content/renderer/autofill_agent.h" |
| 59 #include "components/autofill/content/renderer/password_autofill_agent.h" | 59 #include "components/autofill/content/renderer/password_autofill_agent.h" |
| 60 #include "components/autofill/content/renderer/password_generation_agent.h" | 60 #include "components/autofill/content/renderer/password_generation_agent.h" |
| 61 #include "components/content_settings/core/common/content_settings_pattern.h" | 61 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 62 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" | 62 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" |
| 63 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h" | |
| 63 #include "components/dom_distiller/core/url_constants.h" | 64 #include "components/dom_distiller/core/url_constants.h" |
| 64 #include "components/nacl/renderer/ppb_nacl_private.h" | 65 #include "components/nacl/renderer/ppb_nacl_private.h" |
| 65 #include "components/nacl/renderer/ppb_nacl_private_impl.h" | 66 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
| 66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 67 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
| 67 #include "components/password_manager/content/renderer/credential_manager_client .h" | 68 #include "components/password_manager/content/renderer/credential_manager_client .h" |
| 68 #include "components/pdf/renderer/pepper_pdf_host.h" | 69 #include "components/pdf/renderer/pepper_pdf_host.h" |
| 69 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 70 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
| 70 #include "components/signin/core/common/profile_management_switches.h" | 71 #include "components/signin/core/common/profile_management_switches.h" |
| 71 #include "components/visitedlink/renderer/visitedlink_slave.h" | 72 #include "components/visitedlink/renderer/visitedlink_slave.h" |
| 72 #include "components/web_cache/renderer/web_cache_render_process_observer.h" | 73 #include "components/web_cache/renderer/web_cache_render_process_observer.h" |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 new prerender::PrerenderHelper(render_frame); | 552 new prerender::PrerenderHelper(render_frame); |
| 552 } | 553 } |
| 553 } | 554 } |
| 554 | 555 |
| 555 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) { | 556 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) { |
| 556 // Only attach NetErrorHelper to the main frame, since only the main frame | 557 // Only attach NetErrorHelper to the main frame, since only the main frame |
| 557 // should get error pages. | 558 // should get error pages. |
| 558 new NetErrorHelper(render_frame); | 559 new NetErrorHelper(render_frame); |
| 559 } | 560 } |
| 560 | 561 |
| 562 // Set up a mojo service to test if this page is a distiller page. | |
| 563 new dom_distiller::DistillerJsRenderFrameObserver(render_frame); | |
|
nyquist
2015/07/27 21:44:33
When is this deleted?
mdjones
2015/07/28 20:53:41
This is managed by the RenderFrame object. All the
| |
| 564 | |
| 561 PasswordAutofillAgent* password_autofill_agent = | 565 PasswordAutofillAgent* password_autofill_agent = |
| 562 new PasswordAutofillAgent(render_frame); | 566 new PasswordAutofillAgent(render_frame); |
| 563 PasswordGenerationAgent* password_generation_agent = | 567 PasswordGenerationAgent* password_generation_agent = |
| 564 new PasswordGenerationAgent(render_frame, password_autofill_agent); | 568 new PasswordGenerationAgent(render_frame, password_autofill_agent); |
| 565 new AutofillAgent(render_frame, password_autofill_agent, | 569 new AutofillAgent(render_frame, password_autofill_agent, |
| 566 password_generation_agent); | 570 password_generation_agent); |
| 567 } | 571 } |
| 568 | 572 |
| 569 void ChromeContentRendererClient::RenderViewCreated( | 573 void ChromeContentRendererClient::RenderViewCreated( |
| 570 content::RenderView* render_view) { | 574 content::RenderView* render_view) { |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1619 WebString header_key(ASCIIToUTF16( | 1623 WebString header_key(ASCIIToUTF16( |
| 1620 data_reduction_proxy::chrome_proxy_header())); | 1624 data_reduction_proxy::chrome_proxy_header())); |
| 1621 if (!response.httpHeaderField(header_key).isNull() && | 1625 if (!response.httpHeaderField(header_key).isNull() && |
| 1622 response.httpHeaderField(header_key).utf8().find( | 1626 response.httpHeaderField(header_key).utf8().find( |
| 1623 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != | 1627 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != |
| 1624 std::string::npos) { | 1628 std::string::npos) { |
| 1625 (*properties)[data_reduction_proxy::chrome_proxy_header()] = | 1629 (*properties)[data_reduction_proxy::chrome_proxy_header()] = |
| 1626 data_reduction_proxy::chrome_proxy_lo_fi_directive(); | 1630 data_reduction_proxy::chrome_proxy_lo_fi_directive(); |
| 1627 } | 1631 } |
| 1628 } | 1632 } |
| OLD | NEW |