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