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/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "components/visitedlink/renderer/visitedlink_slave.h" | 74 #include "components/visitedlink/renderer/visitedlink_slave.h" |
75 #include "content/public/common/content_constants.h" | 75 #include "content/public/common/content_constants.h" |
76 #include "content/public/renderer/render_frame.h" | 76 #include "content/public/renderer/render_frame.h" |
77 #include "content/public/renderer/render_thread.h" | 77 #include "content/public/renderer/render_thread.h" |
78 #include "content/public/renderer/render_view.h" | 78 #include "content/public/renderer/render_view.h" |
79 #include "content/public/renderer/render_view_visitor.h" | 79 #include "content/public/renderer/render_view_visitor.h" |
80 #include "extensions/common/constants.h" | 80 #include "extensions/common/constants.h" |
81 #include "extensions/common/extension.h" | 81 #include "extensions/common/extension.h" |
82 #include "extensions/common/extension_set.h" | 82 #include "extensions/common/extension_set.h" |
83 #include "extensions/common/extension_urls.h" | 83 #include "extensions/common/extension_urls.h" |
| 84 #include "extensions/common/switches.h" |
84 #include "grit/generated_resources.h" | 85 #include "grit/generated_resources.h" |
85 #include "grit/locale_settings.h" | 86 #include "grit/locale_settings.h" |
86 #include "grit/renderer_resources.h" | 87 #include "grit/renderer_resources.h" |
87 #include "ipc/ipc_sync_channel.h" | 88 #include "ipc/ipc_sync_channel.h" |
88 #include "net/base/net_errors.h" | 89 #include "net/base/net_errors.h" |
89 #include "ppapi/c/private/ppb_nacl_private.h" | 90 #include "ppapi/c/private/ppb_nacl_private.h" |
90 #include "ppapi/c/private/ppb_pdf.h" | 91 #include "ppapi/c/private/ppb_pdf.h" |
91 #include "ppapi/shared_impl/ppapi_switches.h" | 92 #include "ppapi/shared_impl/ppapi_switches.h" |
92 #include "third_party/WebKit/public/platform/WebURL.h" | 93 #include "third_party/WebKit/public/platform/WebURL.h" |
93 #include "third_party/WebKit/public/platform/WebURLError.h" | 94 #include "third_party/WebKit/public/platform/WebURLError.h" |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 return extensions::IsSourceFromAnExtension(source); | 1383 return extensions::IsSourceFromAnExtension(source); |
1383 } | 1384 } |
1384 | 1385 |
1385 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const { | 1386 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const { |
1386 // SiteIsolationPolicy is off by default. We would like to activate cross-site | 1387 // SiteIsolationPolicy is off by default. We would like to activate cross-site |
1387 // document blocking (for UMA data collection) for normal renderer processes | 1388 // document blocking (for UMA data collection) for normal renderer processes |
1388 // running a normal web page from the Internet. We only turn on | 1389 // running a normal web page from the Internet. We only turn on |
1389 // SiteIsolationPolicy for a renderer process that does not have the extension | 1390 // SiteIsolationPolicy for a renderer process that does not have the extension |
1390 // flag on. | 1391 // flag on. |
1391 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1392 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1392 return !command_line->HasSwitch(switches::kExtensionProcess); | 1393 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1393 } | 1394 } |
1394 | 1395 |
1395 blink::WebWorkerPermissionClientProxy* | 1396 blink::WebWorkerPermissionClientProxy* |
1396 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1397 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1397 content::RenderFrame* render_frame, | 1398 content::RenderFrame* render_frame, |
1398 blink::WebFrame* frame) { | 1399 blink::WebFrame* frame) { |
1399 return new WorkerPermissionClientProxy(render_frame, frame); | 1400 return new WorkerPermissionClientProxy(render_frame, frame); |
1400 } | 1401 } |
OLD | NEW |