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

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

Issue 1093153002: Fix to allow the proxy authentication dialog to appear when hosting gaia in webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Autofill is now only enabled for webviews in WebUI. Created 5 years, 8 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 | no next file » | 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 7bcf360fb9bef5c60f70a964fd5829fd61d46178..e8851bf78b6a81b1e483eb08816c64cd59e0aa86 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
@@ -7,10 +7,15 @@
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/favicon/favicon_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/passwords/manage_passwords_ui_controller.h"
#include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
+#include "chrome/browser/ui/tab_dialogs.h"
#include "chrome/common/chrome_version_info.h"
+#include "components/autofill/core/browser/autofill_manager.h"
#include "components/browsing_data/storage_partition_http_cache_data_remover.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/renderer_context_menu/context_menu_delegate.h"
@@ -102,6 +107,18 @@ void ChromeWebViewGuestDelegate::OnAttachWebViewHelpers(
contents,
scoped_ptr<pdf::PDFWebContentsHelperClient>(
new ChromePDFWebContentsHelperClient()));
+
+ // Autofill is currently only be enabled for webview in WebUI.
vabr (Chromium) 2015/04/22 09:53:56 typo: Remove "be".
paulmeyer 2015/04/22 17:21:06 Whoops, I changed "will" to "is currently" and bro
+ if (!web_view_guest_->owner_web_contents()->GetWebUI())
+ return;
+
+ autofill::ChromeAutofillClient::CreateForWebContents(contents);
+ autofill::ChromeAutofillClient* auto_fill_client =
+ autofill::ChromeAutofillClient::FromWebContents(contents);
+ ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
+ contents, auto_fill_client);
+ ManagePasswordsUIController::CreateForWebContents(contents);
+ TabDialogs::CreateForWebContents(contents);
}
void ChromeWebViewGuestDelegate::OnDidCommitProvisionalLoadForFrame(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698