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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "chrome/renderer/prerender/prerender_helper.h" | 48 #include "chrome/renderer/prerender/prerender_helper.h" |
49 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h" | 49 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h" |
50 #include "chrome/renderer/prerender/prerenderer_client.h" | 50 #include "chrome/renderer/prerender/prerenderer_client.h" |
51 #include "chrome/renderer/principals_extension_bindings.h" | 51 #include "chrome/renderer/principals_extension_bindings.h" |
52 #include "chrome/renderer/safe_browsing/malware_dom_details.h" | 52 #include "chrome/renderer/safe_browsing/malware_dom_details.h" |
53 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 53 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
54 #include "chrome/renderer/searchbox/search_bouncer.h" | 54 #include "chrome/renderer/searchbox/search_bouncer.h" |
55 #include "chrome/renderer/searchbox/searchbox.h" | 55 #include "chrome/renderer/searchbox/searchbox.h" |
56 #include "chrome/renderer/searchbox/searchbox_extension.h" | 56 #include "chrome/renderer/searchbox/searchbox_extension.h" |
57 #include "chrome/renderer/tts_dispatcher.h" | 57 #include "chrome/renderer/tts_dispatcher.h" |
58 #include "chrome/renderer/worker_permission_client_proxy.h" | 58 #include "chrome/renderer/worker_content_settings_client_proxy.h" |
59 #include "components/autofill/content/renderer/autofill_agent.h" | 59 #include "components/autofill/content/renderer/autofill_agent.h" |
60 #include "components/autofill/content/renderer/password_autofill_agent.h" | 60 #include "components/autofill/content/renderer/password_autofill_agent.h" |
61 #include "components/autofill/content/renderer/password_generation_agent.h" | 61 #include "components/autofill/content/renderer/password_generation_agent.h" |
62 #include "components/content_settings/core/common/content_settings_pattern.h" | 62 #include "components/content_settings/core/common/content_settings_pattern.h" |
63 #include "components/dom_distiller/core/url_constants.h" | 63 #include "components/dom_distiller/core/url_constants.h" |
64 #include "components/nacl/renderer/ppb_nacl_private.h" | 64 #include "components/nacl/renderer/ppb_nacl_private.h" |
65 #include "components/nacl/renderer/ppb_nacl_private_impl.h" | 65 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
67 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 67 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
68 #include "components/pdf/renderer/ppb_pdf_impl.h" | 68 #include "components/pdf/renderer/ppb_pdf_impl.h" |
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 // SiteIsolationPolicy for a renderer process that does not have the extension | 1569 // SiteIsolationPolicy for a renderer process that does not have the extension |
1570 // flag on. | 1570 // flag on. |
1571 #if defined(ENABLE_EXTENSIONS) | 1571 #if defined(ENABLE_EXTENSIONS) |
1572 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 1572 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
1573 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); | 1573 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1574 #else | 1574 #else |
1575 return true; | 1575 return true; |
1576 #endif | 1576 #endif |
1577 } | 1577 } |
1578 | 1578 |
1579 blink::WebWorkerPermissionClientProxy* | 1579 blink::WebWorkerContentSettingsClientProxy* |
1580 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1580 ChromeContentRendererClient::CreateWorkerContentSettingsClientProxy( |
1581 content::RenderFrame* render_frame, | 1581 content::RenderFrame* render_frame, |
1582 blink::WebFrame* frame) { | 1582 blink::WebFrame* frame) { |
1583 return new WorkerPermissionClientProxy(render_frame, frame); | 1583 return new WorkerContentSettingsClientProxy(render_frame, frame); |
1584 } | 1584 } |
1585 | 1585 |
1586 bool ChromeContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() { | 1586 bool ChromeContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() { |
1587 #if defined(ENABLE_PLUGINS) | 1587 #if defined(ENABLE_PLUGINS) |
1588 // Allow access for tests. | 1588 // Allow access for tests. |
1589 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1589 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1590 switches::kEnablePepperTesting)) { | 1590 switches::kEnablePepperTesting)) { |
1591 return true; | 1591 return true; |
1592 } | 1592 } |
1593 | 1593 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1640 if (mime_type == content::kBrowserPluginMimeType) { | 1640 if (mime_type == content::kBrowserPluginMimeType) { |
1641 return new extensions::ExtensionsGuestViewContainer(render_frame); | 1641 return new extensions::ExtensionsGuestViewContainer(render_frame); |
1642 } else { | 1642 } else { |
1643 return new extensions::MimeHandlerViewContainer( | 1643 return new extensions::MimeHandlerViewContainer( |
1644 render_frame, mime_type, original_url); | 1644 render_frame, mime_type, original_url); |
1645 } | 1645 } |
1646 #else | 1646 #else |
1647 return NULL; | 1647 return NULL; |
1648 #endif | 1648 #endif |
1649 } | 1649 } |
OLD | NEW |