| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/renderer/aw_content_renderer_client.h" | 5 #include "android_webview/renderer/aw_content_renderer_client.h" |
| 6 | 6 |
| 7 #include "android_webview/common/aw_resource.h" | 7 #include "android_webview/common/aw_resource.h" |
| 8 #include "android_webview/common/render_view_messages.h" | 8 #include "android_webview/common/render_view_messages.h" |
| 9 #include "android_webview/common/url_constants.h" | 9 #include "android_webview/common/url_constants.h" |
| 10 #include "android_webview/renderer/aw_key_systems.h" | 10 #include "android_webview/renderer/aw_key_systems.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 || type == blink::WebNavigationTypeBackForward; | 89 || type == blink::WebNavigationTypeBackForward; |
| 90 | 90 |
| 91 // Don't offer application-initiated navigations unless it's a redirect. | 91 // Don't offer application-initiated navigations unless it's a redirect. |
| 92 if (application_initiated && !is_redirect) | 92 if (application_initiated && !is_redirect) |
| 93 return false; | 93 return false; |
| 94 | 94 |
| 95 const GURL& gurl = request.url(); | 95 const GURL& gurl = request.url(); |
| 96 // For HTTP schemes, only top-level navigations can be overridden. Similarly, | 96 // For HTTP schemes, only top-level navigations can be overridden. Similarly, |
| 97 // WebView Classic lets app override only top level about:blank navigations. | 97 // WebView Classic lets app override only top level about:blank navigations. |
| 98 // So we filter out non-top about:blank navigations here. | 98 // So we filter out non-top about:blank navigations here. |
| 99 if (frame->parent() && (gurl.SchemeIs(content::kHttpScheme) || | 99 if (frame->parent() && (gurl.SchemeIs(url::kHttpScheme) || |
| 100 gurl.SchemeIs(content::kHttpsScheme) || | 100 gurl.SchemeIs(url::kHttpsScheme) || |
| 101 gurl.SchemeIs(content::kAboutScheme))) | 101 gurl.SchemeIs(content::kAboutScheme))) |
| 102 return false; | 102 return false; |
| 103 | 103 |
| 104 // use NavigationInterception throttle to handle the call as that can | 104 // use NavigationInterception throttle to handle the call as that can |
| 105 // be deferred until after the java side has been constructed. | 105 // be deferred until after the java side has been constructed. |
| 106 if (opener_id != MSG_ROUTING_NONE) { | 106 if (opener_id != MSG_ROUTING_NONE) { |
| 107 return false; | 107 return false; |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool ignore_navigation = false; | 110 bool ignore_navigation = false; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | 193 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
| 194 return visited_link_slave_->IsVisited(link_hash); | 194 return visited_link_slave_->IsVisited(link_hash); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void AwContentRendererClient::AddKeySystems( | 197 void AwContentRendererClient::AddKeySystems( |
| 198 std::vector<content::KeySystemInfo>* key_systems) { | 198 std::vector<content::KeySystemInfo>* key_systems) { |
| 199 AwAddKeySystems(key_systems); | 199 AwAddKeySystems(key_systems); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace android_webview | 202 } // namespace android_webview |
| OLD | NEW |