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

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: Add missing DEPS file 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
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 4a2e9b407298f25a3426be3c55d086c7ecef5061..cf8a4816f6a29fb3bcf0bc2b79057edd1f89bc5c 100644
--- a/chrome/browser/ui/browser_tab_contents.cc
+++ b/chrome/browser/ui/browser_tab_contents.cc
@@ -43,8 +43,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.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"
@@ -71,7 +71,7 @@
#include "chrome/browser/ui/metro_pin_tab_helper_win.h"
#endif
-using autofill::AutofillExternalDelegate;
+using autofill::AutofillDriver;
using autofill::AutofillManager;
using autofill::TabAutofillManagerDelegate;
using content::WebContents;
@@ -110,18 +110,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);
+ AutofillDriver::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);
Ilya Sherman 2013/06/05 10:50:02 Rather than passing in the boolean, could you just
blundell 2013/06/11 15:35:47 Done.
blundell 2013/06/11 15:35:47 Done.
BlockedContentTabHelper::CreateForWebContents(web_contents);
BookmarkTabHelper::CreateForWebContents(web_contents);
chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents(

Powered by Google App Engine
This is Rietveld 408576698