Index: chrome/browser/tab_contents/tab_contents.cc |
=================================================================== |
--- chrome/browser/tab_contents/tab_contents.cc (revision 71973) |
+++ chrome/browser/tab_contents/tab_contents.cc (working copy) |
@@ -448,9 +448,9 @@ |
omnibox_search_hint_.reset(new OmniboxSearchHint(this)); |
autofill_manager_.reset(new AutoFillManager(this)); |
- message_filters_.push_back(autofill_manager_.get()); |
+ AddNavigationObserver(autofill_manager_.get()); |
autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this)); |
- message_filters_.push_back(autocomplete_history_manager_.get()); |
+ AddNavigationObserver(autocomplete_history_manager_.get()); |
} |
TabContents::~TabContents() { |
@@ -570,10 +570,12 @@ |
} |
bool TabContents::OnMessageReceived(const IPC::Message& message) { |
- for (size_t i = 0; i < message_filters_.size(); ++i) { |
- if (message_filters_[i]->OnMessageReceived(message)) |
+ ObserverListBase<WebNavigationObserver>::Iterator it( |
+ web_navigation_observers_); |
+ WebNavigationObserver* observer; |
+ while ((observer = it.GetNext()) != NULL) |
+ if (observer->OnMessageReceived(message)) |
return true; |
- } |
bool handled = true; |
bool message_is_ok = true; |
@@ -1985,9 +1987,6 @@ |
// Notify observers about navigation. |
FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_, |
DidNavigateMainFramePostCommit(details, params)); |
- |
- // Clear the cache of forms in AutoFill. |
- autofill_manager_->Reset(); |
} |
void TabContents::DidNavigateAnyFramePostCommit( |
@@ -2926,18 +2925,6 @@ |
} |
} |
-void TabContents::PasswordFormsFound( |
- const std::vector<webkit_glue::PasswordForm>& forms) { |
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_, |
- PasswordFormsFound(forms)); |
-} |
- |
-void TabContents::PasswordFormsVisible( |
- const std::vector<webkit_glue::PasswordForm>& visible_forms) { |
- FOR_EACH_OBSERVER(WebNavigationObserver, web_navigation_observers_, |
- PasswordFormsVisible(visible_forms)); |
-} |
- |
// Checks to see if we should generate a keyword based on the OSDD, and if |
// necessary uses TemplateURLFetcher to download the OSDD and create a keyword. |
void TabContents::PageHasOSDD( |