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 "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 5 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "android_webview/browser/aw_contents_io_thread_client.h" | 9 #include "android_webview/browser/aw_contents_io_thread_client.h" |
10 #include "android_webview/browser/aw_login_delegate.h" | 10 #include "android_webview/browser/aw_login_delegate.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // scheme other than http or https. This is because the embedder | 224 // scheme other than http or https. This is because the embedder |
225 // can't distinguish main frame and subframe callbacks (which could lead | 225 // can't distinguish main frame and subframe callbacks (which could lead |
226 // to broken content if the embedder decides to not ignore the main frame | 226 // to broken content if the embedder decides to not ignore the main frame |
227 // navigation, but ignores the subframe navigation). | 227 // navigation, but ignores the subframe navigation). |
228 // The reason this is supported at all is that certain JavaScript-based | 228 // The reason this is supported at all is that certain JavaScript-based |
229 // frameworks use iframe navigation as a form of communication with the | 229 // frameworks use iframe navigation as a form of communication with the |
230 // embedder. | 230 // embedder. |
231 (resource_type == ResourceType::MAIN_FRAME || | 231 (resource_type == ResourceType::MAIN_FRAME || |
232 (resource_type == ResourceType::SUB_FRAME && | 232 (resource_type == ResourceType::SUB_FRAME && |
233 !request->url().SchemeIs(chrome::kHttpScheme) && | 233 !request->url().SchemeIs(chrome::kHttpScheme) && |
234 !request->url().SchemeIs(chrome::kHttpsScheme))); | 234 !request->url().SchemeIs(content::kHttpsScheme))); |
235 if (allow_intercepting) { | 235 if (allow_intercepting) { |
236 throttles->push_back(InterceptNavigationDelegate::CreateThrottleFor( | 236 throttles->push_back(InterceptNavigationDelegate::CreateThrottleFor( |
237 request)); | 237 request)); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 void AwResourceDispatcherHostDelegate::DownloadStarting( | 241 void AwResourceDispatcherHostDelegate::DownloadStarting( |
242 net::URLRequest* request, | 242 net::URLRequest* request, |
243 content::ResourceContext* resource_context, | 243 content::ResourceContext* resource_context, |
244 int child_id, | 244 int child_id, |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 ChildRouteIDPair(new_child_id, new_route_id)); | 382 ChildRouteIDPair(new_child_id, new_route_id)); |
383 | 383 |
384 if (it != pending_throttles_.end()) { | 384 if (it != pending_throttles_.end()) { |
385 IoThreadClientThrottle* throttle = it->second; | 385 IoThreadClientThrottle* throttle = it->second; |
386 throttle->OnIoThreadClientReady(new_child_id, new_route_id); | 386 throttle->OnIoThreadClientReady(new_child_id, new_route_id); |
387 pending_throttles_.erase(it); | 387 pending_throttles_.erase(it); |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 } // namespace android_webview | 391 } // namespace android_webview |
OLD | NEW |