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/url_constants.h" | 8 #include "android_webview/common/url_constants.h" |
9 #include "android_webview/renderer/aw_render_view_ext.h" | 9 #include "android_webview/renderer/aw_render_view_ext.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 bool AwContentRendererClient::HasErrorPage(int http_status_code, | 61 bool AwContentRendererClient::HasErrorPage(int http_status_code, |
62 std::string* error_domain) { | 62 std::string* error_domain) { |
63 return http_status_code >= 400; | 63 return http_status_code >= 400; |
64 } | 64 } |
65 | 65 |
66 void AwContentRendererClient::GetNavigationErrorStrings( | 66 void AwContentRendererClient::GetNavigationErrorStrings( |
67 WebKit::WebFrame* /* frame */, | 67 WebKit::WebFrame* /* frame */, |
68 const WebKit::WebURLRequest& failed_request, | 68 const WebKit::WebURLRequest& failed_request, |
69 const WebKit::WebURLError& error, | 69 const WebKit::WebURLError& error, |
| 70 const std::string& accept_languages, |
70 std::string* error_html, | 71 std::string* error_html, |
71 string16* error_description) { | 72 string16* error_description) { |
72 if (error_html) { | 73 if (error_html) { |
73 GURL error_url(failed_request.url()); | 74 GURL error_url(failed_request.url()); |
74 std::string err = UTF16ToUTF8(error.localizedDescription); | 75 std::string err = UTF16ToUTF8(error.localizedDescription); |
75 std::string contents; | 76 std::string contents; |
76 if (err.empty()) { | 77 if (err.empty()) { |
77 contents = AwResource::GetNoDomainPageContent(); | 78 contents = AwResource::GetNoDomainPageContent(); |
78 } else { | 79 } else { |
79 contents = AwResource::GetLoadErrorPageContent(); | 80 contents = AwResource::GetLoadErrorPageContent(); |
(...skipping 16 matching lines...) Expand all Loading... |
96 const char* canonical_url, | 97 const char* canonical_url, |
97 size_t length) { | 98 size_t length) { |
98 return visited_link_slave_->ComputeURLFingerprint(canonical_url, length); | 99 return visited_link_slave_->ComputeURLFingerprint(canonical_url, length); |
99 } | 100 } |
100 | 101 |
101 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | 102 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
102 return visited_link_slave_->IsVisited(link_hash); | 103 return visited_link_slave_->IsVisited(link_hash); |
103 } | 104 } |
104 | 105 |
105 } // namespace android_webview | 106 } // namespace android_webview |
OLD | NEW |