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 <vector> | 10 #include <vector> |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 } | 1131 } |
1132 | 1132 |
1133 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { | 1133 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { |
1134 std::string allowed_ports = | 1134 std::string allowed_ports = |
1135 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); | 1135 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); |
1136 net::SetExplicitlyAllowedPorts(allowed_ports); | 1136 net::SetExplicitlyAllowedPorts(allowed_ports); |
1137 } | 1137 } |
1138 } | 1138 } |
1139 | 1139 |
1140 void RenderThreadImpl::RegisterSchemes() { | 1140 void RenderThreadImpl::RegisterSchemes() { |
1141 // swappedout: pages should not be accessible, and should also | 1141 // swappedout: |
1142 // be treated as empty documents that can commit synchronously. | |
1143 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); | 1142 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); |
1144 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); | 1143 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); |
1145 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); | 1144 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); |
| 1145 |
| 1146 // chrome: |
| 1147 WebString chrome_scheme(base::ASCIIToUTF16(kChromeUIScheme)); |
| 1148 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_scheme); |
| 1149 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( |
| 1150 chrome_scheme); |
| 1151 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_scheme); |
| 1152 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(chrome_scheme); |
| 1153 |
| 1154 // chrome-devtools: |
| 1155 WebString devtools_scheme(base::ASCIIToUTF16(kChromeDevToolsScheme)); |
| 1156 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(devtools_scheme); |
1146 } | 1157 } |
1147 | 1158 |
1148 void RenderThreadImpl::NotifyTimezoneChange() { | 1159 void RenderThreadImpl::NotifyTimezoneChange() { |
1149 NotifyTimezoneChangeOnThisThread(); | 1160 NotifyTimezoneChangeOnThisThread(); |
1150 RenderThread::Get()->PostTaskToAllWebWorkers( | 1161 RenderThread::Get()->PostTaskToAllWebWorkers( |
1151 base::Bind(&NotifyTimezoneChangeOnThisThread)); | 1162 base::Bind(&NotifyTimezoneChangeOnThisThread)); |
1152 } | 1163 } |
1153 | 1164 |
1154 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { | 1165 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { |
1155 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); | 1166 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 } | 1896 } |
1886 | 1897 |
1887 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1898 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1888 size_t erased = | 1899 size_t erased = |
1889 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1900 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
1890 routing_id_); | 1901 routing_id_); |
1891 DCHECK_EQ(1u, erased); | 1902 DCHECK_EQ(1u, erased); |
1892 } | 1903 } |
1893 | 1904 |
1894 } // namespace content | 1905 } // namespace content |
OLD | NEW |