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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #include "components/autofill/content/renderer/password_autofill_agent.h" | 58 #include "components/autofill/content/renderer/password_autofill_agent.h" |
59 #include "components/autofill/content/renderer/password_generation_agent.h" | 59 #include "components/autofill/content/renderer/password_generation_agent.h" |
60 #include "components/content_settings/core/common/content_settings_pattern.h" | 60 #include "components/content_settings/core/common/content_settings_pattern.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/password_manager/content/renderer/credential_manager_client
.h" | 65 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
66 #include "components/pdf/renderer/ppb_pdf_impl.h" | 66 #include "components/pdf/renderer/ppb_pdf_impl.h" |
67 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 67 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
| 68 #include "components/rappor/rappor_messages.h" |
68 #include "components/signin/core/common/profile_management_switches.h" | 69 #include "components/signin/core/common/profile_management_switches.h" |
69 #include "components/visitedlink/renderer/visitedlink_slave.h" | 70 #include "components/visitedlink/renderer/visitedlink_slave.h" |
70 #include "components/web_cache/renderer/web_cache_render_process_observer.h" | 71 #include "components/web_cache/renderer/web_cache_render_process_observer.h" |
71 #include "content/public/common/content_constants.h" | 72 #include "content/public/common/content_constants.h" |
72 #include "content/public/renderer/plugin_instance_throttler.h" | 73 #include "content/public/renderer/plugin_instance_throttler.h" |
73 #include "content/public/renderer/render_frame.h" | 74 #include "content/public/renderer/render_frame.h" |
74 #include "content/public/renderer/render_thread.h" | 75 #include "content/public/renderer/render_thread.h" |
75 #include "content/public/renderer/render_view.h" | 76 #include "content/public/renderer/render_view.h" |
76 #include "content/public/renderer/render_view_visitor.h" | 77 #include "content/public/renderer/render_view_visitor.h" |
77 #include "extensions/common/constants.h" | 78 #include "extensions/common/constants.h" |
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 // static | 1474 // static |
1474 bool ChromeContentRendererClient::WasWebRequestUsedBySomeExtensions() { | 1475 bool ChromeContentRendererClient::WasWebRequestUsedBySomeExtensions() { |
1475 #if defined(ENABLE_EXTENSIONS) | 1476 #if defined(ENABLE_EXTENSIONS) |
1476 return g_current_client->extension_dispatcher_ | 1477 return g_current_client->extension_dispatcher_ |
1477 ->WasWebRequestUsedBySomeExtensions(); | 1478 ->WasWebRequestUsedBySomeExtensions(); |
1478 #else | 1479 #else |
1479 return false; | 1480 return false; |
1480 #endif | 1481 #endif |
1481 } | 1482 } |
1482 | 1483 |
| 1484 void ChromeContentRendererClient::RecordRappor( |
| 1485 const std::string& metric, const std::string& sample) { |
| 1486 RenderThread::Get()->Send(new RapporHostMsg_RecordSample(metric, sample)); |
| 1487 } |
| 1488 |
1483 const void* ChromeContentRendererClient::CreatePPAPIInterface( | 1489 const void* ChromeContentRendererClient::CreatePPAPIInterface( |
1484 const std::string& interface_name) { | 1490 const std::string& interface_name) { |
1485 #if defined(ENABLE_PLUGINS) | 1491 #if defined(ENABLE_PLUGINS) |
1486 #if !defined(DISABLE_NACL) | 1492 #if !defined(DISABLE_NACL) |
1487 if (interface_name == PPB_NACL_PRIVATE_INTERFACE) | 1493 if (interface_name == PPB_NACL_PRIVATE_INTERFACE) |
1488 return nacl::GetNaClPrivateInterface(); | 1494 return nacl::GetNaClPrivateInterface(); |
1489 #endif // DISABLE_NACL | 1495 #endif // DISABLE_NACL |
1490 if (interface_name == PPB_PDF_INTERFACE) | 1496 if (interface_name == PPB_PDF_INTERFACE) |
1491 return pdf::PPB_PDF_Impl::GetInterface(); | 1497 return pdf::PPB_PDF_Impl::GetInterface(); |
1492 #endif | 1498 #endif |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 if (mime_type == content::kBrowserPluginMimeType) { | 1638 if (mime_type == content::kBrowserPluginMimeType) { |
1633 return new extensions::ExtensionsGuestViewContainer(render_frame); | 1639 return new extensions::ExtensionsGuestViewContainer(render_frame); |
1634 } else { | 1640 } else { |
1635 return new extensions::MimeHandlerViewContainer( | 1641 return new extensions::MimeHandlerViewContainer( |
1636 render_frame, mime_type, original_url); | 1642 render_frame, mime_type, original_url); |
1637 } | 1643 } |
1638 #else | 1644 #else |
1639 return NULL; | 1645 return NULL; |
1640 #endif | 1646 #endif |
1641 } | 1647 } |
OLD | NEW |