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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // page could cause). | 303 // page could cause). |
304 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme)); | 304 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme)); |
305 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); | 305 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); |
306 | 306 |
307 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); | 307 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); |
308 // The Instant process can only display the content but not read it. Other | 308 // The Instant process can only display the content but not read it. Other |
309 // processes can't display it or read it. | 309 // processes can't display it or read it. |
310 if (!command_line->HasSwitch(switches::kInstantProcess)) | 310 if (!command_line->HasSwitch(switches::kInstantProcess)) |
311 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_search_scheme); | 311 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_search_scheme); |
312 | 312 |
313 WebString dev_tools_scheme(ASCIIToUTF16(chrome::kChromeDevToolsScheme)); | 313 WebString dev_tools_scheme(ASCIIToUTF16(content::kChromeDevToolsScheme)); |
314 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme); | 314 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme); |
315 | 315 |
316 WebString dom_distiller_scheme(ASCIIToUTF16(chrome::kDomDistillerScheme)); | 316 WebString dom_distiller_scheme(ASCIIToUTF16(chrome::kDomDistillerScheme)); |
317 // TODO(nyquist): Add test to ensure this happens when the flag is set. | 317 // TODO(nyquist): Add test to ensure this happens when the flag is set. |
318 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme); | 318 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme); |
319 | 319 |
320 #if defined(OS_CHROMEOS) | 320 #if defined(OS_CHROMEOS) |
321 WebString drive_scheme(ASCIIToUTF16(chrome::kDriveScheme)); | 321 WebString drive_scheme(ASCIIToUTF16(chrome::kDriveScheme)); |
322 WebSecurityPolicy::registerURLSchemeAsLocal(drive_scheme); | 322 WebSecurityPolicy::registerURLSchemeAsLocal(drive_scheme); |
323 #endif | 323 #endif |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1434 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1435 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); | 1435 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1436 } | 1436 } |
1437 | 1437 |
1438 blink::WebWorkerPermissionClientProxy* | 1438 blink::WebWorkerPermissionClientProxy* |
1439 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1439 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1440 content::RenderFrame* render_frame, | 1440 content::RenderFrame* render_frame, |
1441 blink::WebFrame* frame) { | 1441 blink::WebFrame* frame) { |
1442 return new WorkerPermissionClientProxy(render_frame, frame); | 1442 return new WorkerPermissionClientProxy(render_frame, frame); |
1443 } | 1443 } |
OLD | NEW |