| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 std::string* error_domain) { | 138 std::string* error_domain) { |
| 139 return http_status_code >= 400; | 139 return http_status_code >= 400; |
| 140 } | 140 } |
| 141 | 141 |
| 142 void AwContentRendererClient::GetNavigationErrorStrings( | 142 void AwContentRendererClient::GetNavigationErrorStrings( |
| 143 blink::WebFrame* /* frame */, | 143 blink::WebFrame* /* frame */, |
| 144 const blink::WebURLRequest& failed_request, | 144 const blink::WebURLRequest& failed_request, |
| 145 const blink::WebURLError& error, | 145 const blink::WebURLError& error, |
| 146 const std::string& accept_languages, | 146 const std::string& accept_languages, |
| 147 std::string* error_html, | 147 std::string* error_html, |
| 148 string16* error_description) { | 148 base::string16* error_description) { |
| 149 if (error_html) { | 149 if (error_html) { |
| 150 GURL error_url(failed_request.url()); | 150 GURL error_url(failed_request.url()); |
| 151 std::string err = UTF16ToUTF8(error.localizedDescription); | 151 std::string err = UTF16ToUTF8(error.localizedDescription); |
| 152 std::string contents; | 152 std::string contents; |
| 153 if (err.empty()) { | 153 if (err.empty()) { |
| 154 contents = AwResource::GetNoDomainPageContent(); | 154 contents = AwResource::GetNoDomainPageContent(); |
| 155 } else { | 155 } else { |
| 156 contents = AwResource::GetLoadErrorPageContent(); | 156 contents = AwResource::GetLoadErrorPageContent(); |
| 157 ReplaceSubstringsAfterOffset(&contents, 0, "%e", err); | 157 ReplaceSubstringsAfterOffset(&contents, 0, "%e", err); |
| 158 } | 158 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 178 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | 178 bool AwContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
| 179 return visited_link_slave_->IsVisited(link_hash); | 179 return visited_link_slave_->IsVisited(link_hash); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void AwContentRendererClient::AddKeySystems( | 182 void AwContentRendererClient::AddKeySystems( |
| 183 std::vector<content::KeySystemInfo>* key_systems) { | 183 std::vector<content::KeySystemInfo>* key_systems) { |
| 184 AwAddKeySystems(key_systems); | 184 AwAddKeySystems(key_systems); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace android_webview | 187 } // namespace android_webview |
| OLD | NEW |