Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: android_webview/renderer/aw_content_renderer_client.cc

Issue 639113004: [android_webview] Hardcode the default text encoding to UTF-8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 AwRenderViewExt::RenderViewCreated(render_view); 140 AwRenderViewExt::RenderViewCreated(render_view);
141 141
142 new printing::PrintWebViewHelper(render_view); 142 new printing::PrintWebViewHelper(render_view);
143 // TODO(sgurun) do not create a password autofill agent (change 143 // TODO(sgurun) do not create a password autofill agent (change
144 // autofill agent to store a weakptr). 144 // autofill agent to store a weakptr).
145 autofill::PasswordAutofillAgent* password_autofill_agent = 145 autofill::PasswordAutofillAgent* password_autofill_agent =
146 new autofill::PasswordAutofillAgent(render_view); 146 new autofill::PasswordAutofillAgent(render_view);
147 new autofill::AutofillAgent(render_view, password_autofill_agent, NULL); 147 new autofill::AutofillAgent(render_view, password_autofill_agent, NULL);
148 } 148 }
149 149
150 std::string AwContentRendererClient::GetDefaultEncoding() {
151 return AwResource::GetDefaultTextEncoding();
152 }
153
154 bool AwContentRendererClient::HasErrorPage(int http_status_code, 150 bool AwContentRendererClient::HasErrorPage(int http_status_code,
155 std::string* error_domain) { 151 std::string* error_domain) {
156 return http_status_code >= 400; 152 return http_status_code >= 400;
157 } 153 }
158 154
159 void AwContentRendererClient::GetNavigationErrorStrings( 155 void AwContentRendererClient::GetNavigationErrorStrings(
160 content::RenderView* /* render_view */, 156 content::RenderView* /* render_view */,
161 blink::WebFrame* /* frame */, 157 blink::WebFrame* /* frame */,
162 const blink::WebURLRequest& failed_request, 158 const blink::WebURLRequest& failed_request,
163 const blink::WebURLError& error, 159 const blink::WebURLError& error,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 199
204 bool AwContentRendererClient::ShouldOverridePageVisibilityState( 200 bool AwContentRendererClient::ShouldOverridePageVisibilityState(
205 const content::RenderFrame* render_frame, 201 const content::RenderFrame* render_frame,
206 blink::WebPageVisibilityState* override_state) { 202 blink::WebPageVisibilityState* override_state) {
207 // webview is always visible due to rendering requirements. 203 // webview is always visible due to rendering requirements.
208 *override_state = blink::WebPageVisibilityStateVisible; 204 *override_state = blink::WebPageVisibilityStateVisible;
209 return true; 205 return true;
210 } 206 }
211 207
212 } // namespace android_webview 208 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_content_renderer_client.h ('k') | android_webview/test/shell/res/values/strings.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698