| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/renderer/worker_content_settings_client_proxy.h" | 55 #include "chrome/renderer/worker_content_settings_client_proxy.h" |
| 56 #include "components/autofill/content/renderer/autofill_agent.h" | 56 #include "components/autofill/content/renderer/autofill_agent.h" |
| 57 #include "components/autofill/content/renderer/password_autofill_agent.h" | 57 #include "components/autofill/content/renderer/password_autofill_agent.h" |
| 58 #include "components/autofill/content/renderer/password_generation_agent.h" | 58 #include "components/autofill/content/renderer/password_generation_agent.h" |
| 59 #include "components/content_settings/core/common/content_settings_pattern.h" | 59 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 60 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" | 60 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" |
| 61 #include "components/dom_distiller/core/url_constants.h" | 61 #include "components/dom_distiller/core/url_constants.h" |
| 62 #include "components/nacl/renderer/ppb_nacl_private.h" | 62 #include "components/nacl/renderer/ppb_nacl_private.h" |
| 63 #include "components/nacl/renderer/ppb_nacl_private_impl.h" | 63 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
| 64 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 64 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
| 65 #include "components/page_load_metrics/renderer/page_load_metrics_render_frame_o
bserver.h" |
| 65 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 66 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
| 66 #include "components/pdf/renderer/pepper_pdf_host.h" | 67 #include "components/pdf/renderer/pepper_pdf_host.h" |
| 67 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 68 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
| 68 #include "components/signin/core/common/profile_management_switches.h" | 69 #include "components/signin/core/common/profile_management_switches.h" |
| 69 #include "components/version_info/version_info.h" | 70 #include "components/version_info/version_info.h" |
| 70 #include "components/visitedlink/renderer/visitedlink_slave.h" | 71 #include "components/visitedlink/renderer/visitedlink_slave.h" |
| 71 #include "components/web_cache/renderer/web_cache_render_process_observer.h" | 72 #include "components/web_cache/renderer/web_cache_render_process_observer.h" |
| 72 #include "content/public/common/content_constants.h" | 73 #include "content/public/common/content_constants.h" |
| 73 #include "content/public/renderer/plugin_instance_throttler.h" | 74 #include "content/public/renderer/plugin_instance_throttler.h" |
| 74 #include "content/public/renderer/render_frame.h" | 75 #include "content/public/renderer/render_frame.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 new prerender::PrerenderHelper(render_frame); | 556 new prerender::PrerenderHelper(render_frame); |
| 556 } | 557 } |
| 557 } | 558 } |
| 558 | 559 |
| 559 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) { | 560 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) { |
| 560 // Only attach NetErrorHelper to the main frame, since only the main frame | 561 // Only attach NetErrorHelper to the main frame, since only the main frame |
| 561 // should get error pages. | 562 // should get error pages. |
| 562 new NetErrorHelper(render_frame); | 563 new NetErrorHelper(render_frame); |
| 563 } | 564 } |
| 564 | 565 |
| 566 if (render_frame->GetWebFrame()->parent() == nullptr) { |
| 567 // Only attach MainRenderFrameObserver to the main frame, since |
| 568 // we only want to log page load metrics for the main frame. |
| 569 new page_load_metrics::MainRenderFrameObserver(render_frame); |
| 570 } |
| 571 |
| 565 PasswordAutofillAgent* password_autofill_agent = | 572 PasswordAutofillAgent* password_autofill_agent = |
| 566 new PasswordAutofillAgent(render_frame); | 573 new PasswordAutofillAgent(render_frame); |
| 567 PasswordGenerationAgent* password_generation_agent = | 574 PasswordGenerationAgent* password_generation_agent = |
| 568 new PasswordGenerationAgent(render_frame, password_autofill_agent); | 575 new PasswordGenerationAgent(render_frame, password_autofill_agent); |
| 569 new AutofillAgent(render_frame, password_autofill_agent, | 576 new AutofillAgent(render_frame, password_autofill_agent, |
| 570 password_generation_agent); | 577 password_generation_agent); |
| 571 } | 578 } |
| 572 | 579 |
| 573 void ChromeContentRendererClient::RenderViewCreated( | 580 void ChromeContentRendererClient::RenderViewCreated( |
| 574 content::RenderView* render_view) { | 581 content::RenderView* render_view) { |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1644 } | 1651 } |
| 1645 | 1652 |
| 1646 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( | 1653 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( |
| 1647 v8::Local<v8::Context> context, | 1654 v8::Local<v8::Context> context, |
| 1648 const GURL& url) { | 1655 const GURL& url) { |
| 1649 #if defined(ENABLE_EXTENSIONS) | 1656 #if defined(ENABLE_EXTENSIONS) |
| 1650 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(context, | 1657 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(context, |
| 1651 url); | 1658 url); |
| 1652 #endif | 1659 #endif |
| 1653 } | 1660 } |
| OLD | NEW |