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 15097004: Enable Autocomplete feature for chromium webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setSaveFormData2
Patch Set: address Ben's comments Created 7 years, 7 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/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 "android_webview/renderer/view_renderer.h" 10 #include "android_webview/renderer/view_renderer.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "components/autofill/renderer/autofill_agent.h"
14 #include "components/autofill/renderer/password_autofill_agent.h"
13 #include "components/visitedlink/renderer/visitedlink_slave.h" 15 #include "components/visitedlink/renderer/visitedlink_slave.h"
14 #include "content/public/renderer/render_thread.h" 16 #include "content/public/renderer/render_thread.h"
15 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
18 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" 20 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h"
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" 21 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
21 23
22 namespace android_webview { 24 namespace android_webview {
(...skipping 15 matching lines...) Expand all
38 thread->AddObserver(aw_render_process_observer_.get()); 40 thread->AddObserver(aw_render_process_observer_.get());
39 41
40 visited_link_slave_.reset(new components::VisitedLinkSlave); 42 visited_link_slave_.reset(new components::VisitedLinkSlave);
41 thread->AddObserver(visited_link_slave_.get()); 43 thread->AddObserver(visited_link_slave_.get());
42 } 44 }
43 45
44 void AwContentRendererClient::RenderViewCreated( 46 void AwContentRendererClient::RenderViewCreated(
45 content::RenderView* render_view) { 47 content::RenderView* render_view) {
46 AwRenderViewExt::RenderViewCreated(render_view); 48 AwRenderViewExt::RenderViewCreated(render_view);
47 ViewRenderer::RenderViewCreated(render_view); 49 ViewRenderer::RenderViewCreated(render_view);
50
51 autofill::PasswordAutofillAgent* password_autofill_agent =
52 new autofill::PasswordAutofillAgent(render_view);
53 new autofill::AutofillAgent(render_view, password_autofill_agent);
48 } 54 }
49 55
50 std::string AwContentRendererClient::GetDefaultEncoding() { 56 std::string AwContentRendererClient::GetDefaultEncoding() {
51 return AwResource::GetDefaultTextEncoding(); 57 return AwResource::GetDefaultTextEncoding();
52 } 58 }
53 59
54 bool AwContentRendererClient::HasErrorPage(int http_status_code, 60 bool AwContentRendererClient::HasErrorPage(int http_status_code,
55 std::string* error_domain) { 61 std::string* error_domain) {
56 return http_status_code >= 400; 62 return http_status_code >= 400;
57 } 63 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return visited_link_slave_->IsVisited(link_hash); 95 return visited_link_slave_->IsVisited(link_hash);
90 } 96 }
91 97
92 void AwContentRendererClient::PrefetchHostName(const char* hostname, 98 void AwContentRendererClient::PrefetchHostName(const char* hostname,
93 size_t length) { 99 size_t length) {
94 // TODO(boliu): Implement hostname prefetch for Android WebView. 100 // TODO(boliu): Implement hostname prefetch for Android WebView.
95 // Perhaps componentize chrome implementation or move to content/? 101 // Perhaps componentize chrome implementation or move to content/?
96 } 102 }
97 103
98 } // namespace android_webview 104 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698