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

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

Issue 662493002: [Password Generation] Enable generation for dynamically created forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android 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"
11 #include "android_webview/renderer/aw_permission_client.h" 11 #include "android_webview/renderer/aw_permission_client.h"
12 #include "android_webview/renderer/aw_render_frame_ext.h" 12 #include "android_webview/renderer/aw_render_frame_ext.h"
13 #include "android_webview/renderer/aw_render_view_ext.h" 13 #include "android_webview/renderer/aw_render_view_ext.h"
14 #include "android_webview/renderer/print_render_frame_observer.h" 14 #include "android_webview/renderer/print_render_frame_observer.h"
15 #include "android_webview/renderer/print_web_view_helper.h" 15 #include "android_webview/renderer/print_web_view_helper.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "components/autofill/content/renderer/autofill_agent.h" 18 #include "components/autofill/content/renderer/autofill_agent.h"
19 #include "components/autofill/content/renderer/password_autofill_agent.h" 19 #include "components/autofill/content/renderer/password_autofill_agent.h"
20 #include "components/autofill/content/renderer/password_generation_agent.h"
20 #include "components/visitedlink/renderer/visitedlink_slave.h" 21 #include "components/visitedlink/renderer/visitedlink_slave.h"
21 #include "content/public/common/url_constants.h" 22 #include "content/public/common/url_constants.h"
22 #include "content/public/renderer/document_state.h" 23 #include "content/public/renderer/document_state.h"
23 #include "content/public/renderer/navigation_state.h" 24 #include "content/public/renderer/navigation_state.h"
24 #include "content/public/renderer/render_frame.h" 25 #include "content/public/renderer/render_frame.h"
25 #include "content/public/renderer/render_thread.h" 26 #include "content/public/renderer/render_thread.h"
26 #include "content/public/renderer/render_view.h" 27 #include "content/public/renderer/render_view.h"
27 #include "net/base/escape.h" 28 #include "net/base/escape.h"
28 #include "net/base/net_errors.h" 29 #include "net/base/net_errors.h"
29 #include "third_party/WebKit/public/platform/WebString.h" 30 #include "third_party/WebKit/public/platform/WebString.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 138
138 void AwContentRendererClient::RenderViewCreated( 139 void AwContentRendererClient::RenderViewCreated(
139 content::RenderView* render_view) { 140 content::RenderView* render_view) {
140 AwRenderViewExt::RenderViewCreated(render_view); 141 AwRenderViewExt::RenderViewCreated(render_view);
141 142
142 new printing::PrintWebViewHelper(render_view); 143 new printing::PrintWebViewHelper(render_view);
143 // TODO(sgurun) do not create a password autofill agent (change 144 // TODO(sgurun) do not create a password autofill agent (change
144 // autofill agent to store a weakptr). 145 // autofill agent to store a weakptr).
145 autofill::PasswordAutofillAgent* password_autofill_agent = 146 autofill::PasswordAutofillAgent* password_autofill_agent =
146 new autofill::PasswordAutofillAgent(render_view); 147 new autofill::PasswordAutofillAgent(render_view);
147 new autofill::AutofillAgent(render_view, password_autofill_agent, NULL); 148 autofill::PasswordGenerationAgent* password_generation_agent =
149 new autofill::PasswordGenerationAgent(render_view);
150 new autofill::AutofillAgent(
151 render_view, password_autofill_agent, password_generation_agent);
148 } 152 }
149 153
150 bool AwContentRendererClient::HasErrorPage(int http_status_code, 154 bool AwContentRendererClient::HasErrorPage(int http_status_code,
151 std::string* error_domain) { 155 std::string* error_domain) {
152 return http_status_code >= 400; 156 return http_status_code >= 400;
153 } 157 }
154 158
155 void AwContentRendererClient::GetNavigationErrorStrings( 159 void AwContentRendererClient::GetNavigationErrorStrings(
156 content::RenderView* /* render_view */, 160 content::RenderView* /* render_view */,
157 blink::WebFrame* /* frame */, 161 blink::WebFrame* /* frame */,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 203
200 bool AwContentRendererClient::ShouldOverridePageVisibilityState( 204 bool AwContentRendererClient::ShouldOverridePageVisibilityState(
201 const content::RenderFrame* render_frame, 205 const content::RenderFrame* render_frame,
202 blink::WebPageVisibilityState* override_state) { 206 blink::WebPageVisibilityState* override_state) {
203 // webview is always visible due to rendering requirements. 207 // webview is always visible due to rendering requirements.
204 *override_state = blink::WebPageVisibilityStateVisible; 208 *override_state = blink::WebPageVisibilityStateVisible;
205 return true; 209 return true;
206 } 210 }
207 211
208 } // namespace android_webview 212 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698