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

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 8353025: External autofill delegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase against TOT Created 9 years, 2 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/tab_contents/tab_contents_wrapper.cc
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index de074c1f3dcce8346622242ac9ec45afbb7c0cb1..78843dc8460afb4d4da4f74d3a648abfaa12fe5d 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -6,9 +6,11 @@
#include "base/utf_string_conversions.h"
+#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/stringprintf.h"
#include "chrome/browser/autocomplete_history_manager.h"
+#include "chrome/browser/autofill/autofill_external_delegate.h"
#include "chrome/browser/autofill/autofill_manager.h"
#include "chrome/browser/automation/automation_tab_helper.h"
#include "chrome/browser/browser_process.h"
@@ -246,6 +248,14 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
// Create the tab helpers.
autocomplete_history_manager_.reset(new AutocompleteHistoryManager(contents));
autofill_manager_.reset(new AutofillManager(this));
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kExternalAutofillPopup)) {
+ autofill_external_delegate_.reset(
+ AutofillExternalDelegate::Create(this, autofill_manager_.get()));
+ autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get());
+ autocomplete_history_manager_->SetExternalDelegate(
+ autofill_external_delegate_.get());
+ }
automation_tab_helper_.reset(new AutomationTabHelper(contents));
blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this));
bookmark_tab_helper_.reset(new BookmarkTabHelper(this));

Powered by Google App Engine
This is Rietveld 408576698