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

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

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mem leak Created 6 years 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
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // TODO(jam): when the frame tree moves into content and parent() works at 126 // TODO(jam): when the frame tree moves into content and parent() works at
127 // RenderFrame construction, simplify this by just checking parent(). 127 // RenderFrame construction, simplify this by just checking parent().
128 content::RenderFrame* parent_frame = 128 content::RenderFrame* parent_frame =
129 render_frame->GetRenderView()->GetMainRenderFrame(); 129 render_frame->GetRenderView()->GetMainRenderFrame();
130 if (parent_frame && parent_frame != render_frame) { 130 if (parent_frame && parent_frame != render_frame) {
131 // Avoid any race conditions from having the browser's UI thread tell the IO 131 // Avoid any race conditions from having the browser's UI thread tell the IO
132 // thread that a subframe was created. 132 // thread that a subframe was created.
133 RenderThread::Get()->Send(new AwViewHostMsg_SubFrameCreated( 133 RenderThread::Get()->Send(new AwViewHostMsg_SubFrameCreated(
134 parent_frame->GetRoutingID(), render_frame->GetRoutingID())); 134 parent_frame->GetRoutingID(), render_frame->GetRoutingID()));
135 } 135 }
136
137 // TODO(sgurun) do not create a password autofill agent (change
138 // autofill agent to store a weakptr).
139 autofill::PasswordAutofillAgent* password_autofill_agent =
140 new autofill::PasswordAutofillAgent(render_frame);
141 new autofill::AutofillAgent(render_frame, password_autofill_agent, NULL);
136 } 142 }
137 143
138 void AwContentRendererClient::RenderViewCreated( 144 void AwContentRendererClient::RenderViewCreated(
139 content::RenderView* render_view) { 145 content::RenderView* render_view) {
140 AwRenderViewExt::RenderViewCreated(render_view); 146 AwRenderViewExt::RenderViewCreated(render_view);
141 147
142 new printing::PrintWebViewHelper(render_view); 148 new printing::PrintWebViewHelper(render_view);
143 // TODO(sgurun) do not create a password autofill agent (change
144 // autofill agent to store a weakptr).
145 autofill::PasswordAutofillAgent* password_autofill_agent =
146 new autofill::PasswordAutofillAgent(render_view);
147 new autofill::AutofillAgent(render_view, password_autofill_agent, NULL);
148 } 149 }
149 150
150 bool AwContentRendererClient::HasErrorPage(int http_status_code, 151 bool AwContentRendererClient::HasErrorPage(int http_status_code,
151 std::string* error_domain) { 152 std::string* error_domain) {
152 return http_status_code >= 400; 153 return http_status_code >= 400;
153 } 154 }
154 155
155 void AwContentRendererClient::GetNavigationErrorStrings( 156 void AwContentRendererClient::GetNavigationErrorStrings(
156 content::RenderView* /* render_view */, 157 content::RenderView* /* render_view */,
157 blink::WebFrame* /* frame */, 158 blink::WebFrame* /* frame */,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 bool AwContentRendererClient::ShouldOverridePageVisibilityState( 201 bool AwContentRendererClient::ShouldOverridePageVisibilityState(
201 const content::RenderFrame* render_frame, 202 const content::RenderFrame* render_frame,
202 blink::WebPageVisibilityState* override_state) { 203 blink::WebPageVisibilityState* override_state) {
203 // webview is always visible due to rendering requirements. 204 // webview is always visible due to rendering requirements.
204 *override_state = blink::WebPageVisibilityStateVisible; 205 *override_state = blink::WebPageVisibilityStateVisible;
205 return true; 206 return true;
206 } 207 }
207 208
208 } // namespace android_webview 209 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698