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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 | 1324 |
1325 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { | 1325 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { |
1326 std::string allowed_ports = | 1326 std::string allowed_ports = |
1327 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); | 1327 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); |
1328 net::SetExplicitlyAllowedPorts(allowed_ports); | 1328 net::SetExplicitlyAllowedPorts(allowed_ports); |
1329 } | 1329 } |
1330 } | 1330 } |
1331 | 1331 |
1332 void RenderThreadImpl::RegisterSchemes() { | 1332 void RenderThreadImpl::RegisterSchemes() { |
1333 // chrome: | 1333 // chrome: |
1334 WebString chrome_scheme(base::ASCIIToUTF16(kChromeUIScheme)); | 1334 WebString chrome_scheme(WebString::fromASCII(kChromeUIScheme)); |
1335 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_scheme); | 1335 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_scheme); |
1336 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( | 1336 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( |
1337 chrome_scheme); | 1337 chrome_scheme); |
1338 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_scheme); | 1338 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_scheme); |
1339 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(chrome_scheme); | 1339 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(chrome_scheme); |
1340 | 1340 |
1341 // chrome-devtools: | 1341 // chrome-devtools: |
1342 WebString devtools_scheme(base::ASCIIToUTF16(kChromeDevToolsScheme)); | 1342 WebString devtools_scheme(WebString::fromASCII(kChromeDevToolsScheme)); |
1343 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(devtools_scheme); | 1343 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(devtools_scheme); |
1344 | 1344 |
1345 // view-source: | 1345 // view-source: |
1346 WebString view_source_scheme(base::ASCIIToUTF16(kViewSourceScheme)); | 1346 WebString view_source_scheme(WebString::fromASCII(kViewSourceScheme)); |
1347 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(view_source_scheme); | 1347 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(view_source_scheme); |
1348 } | 1348 } |
1349 | 1349 |
1350 void RenderThreadImpl::NotifyTimezoneChange() { | 1350 void RenderThreadImpl::NotifyTimezoneChange() { |
1351 NotifyTimezoneChangeOnThisThread(); | 1351 NotifyTimezoneChangeOnThisThread(); |
1352 RenderThread::Get()->PostTaskToAllWebWorkers( | 1352 RenderThread::Get()->PostTaskToAllWebWorkers( |
1353 base::Bind(&NotifyTimezoneChangeOnThisThread)); | 1353 base::Bind(&NotifyTimezoneChangeOnThisThread)); |
1354 } | 1354 } |
1355 | 1355 |
1356 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { | 1356 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2482 } | 2482 } |
2483 } | 2483 } |
2484 | 2484 |
2485 void RenderThreadImpl::OnRendererInterfaceRequest( | 2485 void RenderThreadImpl::OnRendererInterfaceRequest( |
2486 mojom::RendererAssociatedRequest request) { | 2486 mojom::RendererAssociatedRequest request) { |
2487 DCHECK(!renderer_binding_.is_bound()); | 2487 DCHECK(!renderer_binding_.is_bound()); |
2488 renderer_binding_.Bind(std::move(request)); | 2488 renderer_binding_.Bind(std::move(request)); |
2489 } | 2489 } |
2490 | 2490 |
2491 } // namespace content | 2491 } // namespace content |
OLD | NEW |