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

Unified Diff: chrome/browser/ui/browser_tab_contents.cc

Issue 16286020: Abstract WebContentsObserver from Autofill shared code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to fix conflict Created 7 years, 6 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 | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tab_contents.cc
diff --git a/chrome/browser/ui/browser_tab_contents.cc b/chrome/browser/ui/browser_tab_contents.cc
index 6877b7cfee5717f519df927058249d26dbb73db5..56d3204252fb00e1f43d1269cc820f671101de01 100644
--- a/chrome/browser/ui/browser_tab_contents.cc
+++ b/chrome/browser/ui/browser_tab_contents.cc
@@ -42,8 +42,8 @@
#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "chrome/common/chrome_switches.h"
-#include "components/autofill/browser/autofill_external_delegate.h"
#include "components/autofill/browser/autofill_manager.h"
+#include "components/autofill/content/browser/autofill_driver_impl.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/view_type_utils.h"
@@ -70,7 +70,7 @@
#include "chrome/browser/ui/metro_pin_tab_helper_win.h"
#endif
-using autofill::AutofillExternalDelegate;
+using autofill::AutofillDriverImpl;
using autofill::AutofillManager;
using autofill::TabAutofillManagerDelegate;
using content::WebContents;
@@ -109,18 +109,15 @@ void BrowserTabContents::AttachTabHelpers(WebContents* web_contents) {
AlternateErrorPageTabObserver::CreateForWebContents(web_contents);
TabAutofillManagerDelegate::CreateForWebContents(web_contents);
- AutofillManager::CreateForWebContentsAndDelegate(
+ bool native_autofill_ui_enabled =
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableNativeAutofillUi);
+ AutofillDriverImpl::CreateForWebContentsAndDelegate(
web_contents,
TabAutofillManagerDelegate::FromWebContents(web_contents),
g_browser_process->GetApplicationLocale(),
- AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableNativeAutofillUi)) {
- AutofillExternalDelegate::CreateForWebContentsAndManager(
- web_contents, AutofillManager::FromWebContents(web_contents));
- AutofillManager::FromWebContents(web_contents)->SetExternalDelegate(
- AutofillExternalDelegate::FromWebContents(web_contents));
- }
+ AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER,
+ native_autofill_ui_enabled);
BlockedContentTabHelper::CreateForWebContents(web_contents);
BookmarkTabHelper::CreateForWebContents(web_contents);
chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents(
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698