Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
| 27 #include "net/base/net_errors.h" | 27 #include "net/base/net_errors.h" |
| 28 #include "third_party/WebKit/public/platform/WebString.h" | 28 #include "third_party/WebKit/public/platform/WebString.h" |
| 29 #include "third_party/WebKit/public/platform/WebURL.h" | 29 #include "third_party/WebKit/public/platform/WebURL.h" |
| 30 #include "third_party/WebKit/public/platform/WebURLError.h" | 30 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 31 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 31 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 32 #include "third_party/WebKit/public/web/WebFrame.h" | 32 #include "third_party/WebKit/public/web/WebFrame.h" |
| 33 #include "third_party/WebKit/public/web/WebNavigationType.h" | 33 #include "third_party/WebKit/public/web/WebNavigationType.h" |
| 34 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 34 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
| 35 #include "url/gurl.h" | 35 #include "url/gurl.h" |
| 36 #include "url/url_constants.h" | |
|
jochen (gone - plz use gerrit)
2014/04/29 13:38:44
instead of adding this include everywhere, what ab
Sungmann Cho
2014/04/30 02:06:43
Done.
| |
| 36 | 37 |
| 37 using content::RenderThread; | 38 using content::RenderThread; |
| 38 | 39 |
| 39 namespace android_webview { | 40 namespace android_webview { |
| 40 | 41 |
| 41 AwContentRendererClient::AwContentRendererClient() { | 42 AwContentRendererClient::AwContentRendererClient() { |
| 42 } | 43 } |
| 43 | 44 |
| 44 AwContentRendererClient::~AwContentRendererClient() { | 45 AwContentRendererClient::~AwContentRendererClient() { |
| 45 } | 46 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 || type == blink::WebNavigationTypeBackForward; | 90 || type == blink::WebNavigationTypeBackForward; |
| 90 | 91 |
| 91 // Don't offer application-initiated navigations unless it's a redirect. | 92 // Don't offer application-initiated navigations unless it's a redirect. |
| 92 if (application_initiated && !is_redirect) | 93 if (application_initiated && !is_redirect) |
| 93 return false; | 94 return false; |
| 94 | 95 |
| 95 const GURL& gurl = request.url(); | 96 const GURL& gurl = request.url(); |
| 96 // For HTTP schemes, only top-level navigations can be overridden. Similarly, | 97 // For HTTP schemes, only top-level navigations can be overridden. Similarly, |
| 97 // WebView Classic lets app override only top level about:blank navigations. | 98 // WebView Classic lets app override only top level about:blank navigations. |
| 98 // So we filter out non-top about:blank navigations here. | 99 // So we filter out non-top about:blank navigations here. |
| 99 if (frame->parent() && (gurl.SchemeIs(content::kHttpScheme) || | 100 if (frame->parent() && (gurl.SchemeIs(url::kHttpScheme) || |
| 100 gurl.SchemeIs(content::kHttpsScheme) || | 101 gurl.SchemeIs(url::kHttpsScheme) || |
| 101 gurl.SchemeIs(content::kAboutScheme))) | 102 gurl.SchemeIs(content::kAboutScheme))) |
| 102 return false; | 103 return false; |
| 103 | 104 |
| 104 // use NavigationInterception throttle to handle the call as that can | 105 // use NavigationInterception throttle to handle the call as that can |
| 105 // be deferred until after the java side has been constructed. | 106 // be deferred until after the java side has been constructed. |
| 106 if (opener_id != MSG_ROUTING_NONE) { | 107 if (opener_id != MSG_ROUTING_NONE) { |
| 107 return false; | 108 return false; |
| 108 } | 109 } |
| 109 | 110 |
| 110 bool ignore_navigation = false; | 111 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) { | 194 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
| 194 return visited_link_slave_->IsVisited(link_hash); | 195 return visited_link_slave_->IsVisited(link_hash); |
| 195 } | 196 } |
| 196 | 197 |
| 197 void AwContentRendererClient::AddKeySystems( | 198 void AwContentRendererClient::AddKeySystems( |
| 198 std::vector<content::KeySystemInfo>* key_systems) { | 199 std::vector<content::KeySystemInfo>* key_systems) { |
| 199 AwAddKeySystems(key_systems); | 200 AwAddKeySystems(key_systems); |
| 200 } | 201 } |
| 201 | 202 |
| 202 } // namespace android_webview | 203 } // namespace android_webview |
| OLD | NEW |