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

Unified Diff: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc

Issue 866523002: [Abandoned] Add Autofill to the <webview> chrome://chrome-signin page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no autofill in extensions/apps Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/chrome_autofill_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc
diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc
index 89e6dae808efc3a05d7d43febc2ba398487c7154..cb2d01034f69455db94efbc4675fc68ee210c164 100644
--- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc
+++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc
@@ -2,15 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
#include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
+#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
+#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
#include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
#include "chrome/common/chrome_version_info.h"
+#include "components/autofill/content/browser/content_autofill_driver_factory.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/renderer_context_menu/context_menu_delegate.h"
#include "extensions/browser/api/web_request/web_request_api.h"
@@ -76,6 +79,20 @@ void ChromeWebViewGuestDelegate::OnAttachWebViewHelpers(
contents,
scoped_ptr<pdf::PDFWebContentsHelperClient>(
new ChromePDFWebContentsHelperClient()));
+
+ // <webview> outside of Chrome Apps does not handle autofill.
Fady Samuel 2015/02/12 19:16:26 This should say that <webview> in Chrome Apps and
noms (inactive) 2015/02/12 19:55:28 Done.
+ if (web_view_guest_->in_extension())
+ return;
+
+ autofill::ChromeAutofillClient::CreateForWebContents(contents);
+ ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
+ contents,
+ autofill::ChromeAutofillClient::FromWebContents(contents));
+ autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(
+ contents,
+ autofill::ChromeAutofillClient::FromWebContents(contents),
+ g_browser_process->GetApplicationLocale(),
+ autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
}
void ChromeWebViewGuestDelegate::OnDidCommitProvisionalLoadForFrame(
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/chrome_autofill_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698