| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 #if defined(ENABLE_EXTENSIONS) | 121 #if defined(ENABLE_EXTENSIONS) |
| 122 #include "chrome/common/extensions/chrome_extensions_client.h" | 122 #include "chrome/common/extensions/chrome_extensions_client.h" |
| 123 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h" | 123 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h" |
| 124 #include "extensions/common/extension_urls.h" | 124 #include "extensions/common/extension_urls.h" |
| 125 #include "extensions/common/switches.h" | 125 #include "extensions/common/switches.h" |
| 126 #include "extensions/renderer/dispatcher.h" | 126 #include "extensions/renderer/dispatcher.h" |
| 127 #include "extensions/renderer/renderer_extension_registry.h" | 127 #include "extensions/renderer/renderer_extension_registry.h" |
| 128 #endif | 128 #endif |
| 129 | 129 |
| 130 #if defined(ENABLE_IPC_FUZZER) | |
| 131 #include "chrome/common/external_ipc_dumper.h" | |
| 132 #endif | |
| 133 | |
| 134 #if defined(ENABLE_PLUGINS) | 130 #if defined(ENABLE_PLUGINS) |
| 135 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" | 131 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" |
| 136 #include "chrome/renderer/plugins/power_saver_info.h" | 132 #include "chrome/renderer/plugins/power_saver_info.h" |
| 137 #endif | 133 #endif |
| 138 | 134 |
| 139 #if defined(ENABLE_PRINTING) | 135 #if defined(ENABLE_PRINTING) |
| 140 #include "chrome/common/chrome_content_client.h" | 136 #include "chrome/common/chrome_content_client.h" |
| 141 #include "chrome/renderer/printing/chrome_print_web_view_helper_delegate.h" | 137 #include "chrome/renderer/printing/chrome_print_web_view_helper_delegate.h" |
| 142 #include "components/printing/renderer/print_web_view_helper.h" | 138 #include "components/printing/renderer/print_web_view_helper.h" |
| 143 #include "printing/print_settings.h" | 139 #include "printing/print_settings.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 #if defined(OS_CHROMEOS) | 396 #if defined(OS_CHROMEOS) |
| 401 WebSecurityPolicy::registerURLSchemeAsLocal( | 397 WebSecurityPolicy::registerURLSchemeAsLocal( |
| 402 WebString::fromUTF8(content::kExternalFileScheme)); | 398 WebString::fromUTF8(content::kExternalFileScheme)); |
| 403 #endif | 399 #endif |
| 404 | 400 |
| 405 #if defined(OS_ANDROID) | 401 #if defined(OS_ANDROID) |
| 406 WebSecurityPolicy::registerURLSchemeAsAllowedForReferrer( | 402 WebSecurityPolicy::registerURLSchemeAsAllowedForReferrer( |
| 407 WebString::fromUTF8(chrome::kAndroidAppScheme)); | 403 WebString::fromUTF8(chrome::kAndroidAppScheme)); |
| 408 #endif | 404 #endif |
| 409 | 405 |
| 410 #if defined(ENABLE_IPC_FUZZER) | |
| 411 if (command_line->HasSwitch(switches::kIpcDumpDirectory)) { | |
| 412 base::FilePath dump_directory = | |
| 413 command_line->GetSwitchValuePath(switches::kIpcDumpDirectory); | |
| 414 IPC::ChannelProxy::OutgoingMessageFilter* filter = | |
| 415 LoadExternalIPCDumper(dump_directory); | |
| 416 thread->GetChannel()->set_outgoing_message_filter(filter); | |
| 417 } | |
| 418 #endif | |
| 419 | |
| 420 // chrome-search: pages should not be accessible by bookmarklets | 406 // chrome-search: pages should not be accessible by bookmarklets |
| 421 // or javascript: URLs typed in the omnibox. | 407 // or javascript: URLs typed in the omnibox. |
| 422 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( | 408 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( |
| 423 chrome_search_scheme); | 409 chrome_search_scheme); |
| 424 | 410 |
| 425 // chrome-search: resources shouldn't trigger insecure content warnings. Note | 411 // chrome-search: resources shouldn't trigger insecure content warnings. Note |
| 426 // that chrome-extension: and chrome-extension-resource: schemes are taken | 412 // that chrome-extension: and chrome-extension-resource: schemes are taken |
| 427 // care of in extensions::Dispatcher. | 413 // care of in extensions::Dispatcher. |
| 428 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_search_scheme); | 414 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_search_scheme); |
| 429 | 415 |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 // chrome.system.network.getNetworkInterfaces provides the same | 1370 // chrome.system.network.getNetworkInterfaces provides the same |
| 1385 // information. Also, the enforcement of sending and binding UDP is already done | 1371 // information. Also, the enforcement of sending and binding UDP is already done |
| 1386 // by chrome extension permission model. | 1372 // by chrome extension permission model. |
| 1387 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1373 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
| 1388 #if defined(ENABLE_EXTENSIONS) | 1374 #if defined(ENABLE_EXTENSIONS) |
| 1389 return !IsStandaloneExtensionProcess(); | 1375 return !IsStandaloneExtensionProcess(); |
| 1390 #else | 1376 #else |
| 1391 return true; | 1377 return true; |
| 1392 #endif | 1378 #endif |
| 1393 } | 1379 } |
| OLD | NEW |