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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 pdf_print_client_.reset(new ChromePDFPrintClient()); | 510 pdf_print_client_.reset(new ChromePDFPrintClient()); |
511 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); | 511 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); |
512 #endif | 512 #endif |
513 | 513 |
514 std::set<GURL> origins; | 514 std::set<GURL> origins; |
515 GetSecureOriginWhitelist(&origins); | 515 GetSecureOriginWhitelist(&origins); |
516 for (const GURL& origin : origins) { | 516 for (const GURL& origin : origins) { |
517 WebSecurityPolicy::addOriginTrustworthyWhiteList( | 517 WebSecurityPolicy::addOriginTrustworthyWhiteList( |
518 WebSecurityOrigin::create(origin)); | 518 WebSecurityOrigin::create(origin)); |
519 } | 519 } |
| 520 |
| 521 std::set<std::string> schemes; |
| 522 GetSchemesBypassingSecureContextCheckWhitelist(&schemes); |
| 523 for (const std::string& scheme : schemes) { |
| 524 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( |
| 525 WebString::fromUTF8(scheme)); |
| 526 } |
520 } | 527 } |
521 | 528 |
522 void ChromeContentRendererClient::RenderFrameCreated( | 529 void ChromeContentRendererClient::RenderFrameCreated( |
523 content::RenderFrame* render_frame) { | 530 content::RenderFrame* render_frame) { |
524 new ChromeRenderFrameObserver(render_frame); | 531 new ChromeRenderFrameObserver(render_frame); |
525 | 532 |
526 bool should_whitelist_for_content_settings = | 533 bool should_whitelist_for_content_settings = |
527 base::CommandLine::ForCurrentProcess()->HasSwitch( | 534 base::CommandLine::ForCurrentProcess()->HasSwitch( |
528 switches::kInstantProcess); | 535 switches::kInstantProcess); |
529 extensions::Dispatcher* ext_dispatcher = NULL; | 536 extensions::Dispatcher* ext_dispatcher = NULL; |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 // chrome.system.network.getNetworkInterfaces provides the same | 1683 // chrome.system.network.getNetworkInterfaces provides the same |
1677 // information. Also, the enforcement of sending and binding UDP is already done | 1684 // information. Also, the enforcement of sending and binding UDP is already done |
1678 // by chrome extension permission model. | 1685 // by chrome extension permission model. |
1679 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1686 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1680 #if defined(ENABLE_EXTENSIONS) | 1687 #if defined(ENABLE_EXTENSIONS) |
1681 return !IsStandaloneExtensionProcess(); | 1688 return !IsStandaloneExtensionProcess(); |
1682 #else | 1689 #else |
1683 return true; | 1690 return true; |
1684 #endif | 1691 #endif |
1685 } | 1692 } |
OLD | NEW |