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 db38d5d62bab779a521ffa759b0fd52cbd068993..b341453d1c202adf430a74bcc0073398aabb1e1d 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" |
@@ -247,6 +249,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)); |