Index: chrome/browser/ui/search/search_tab_helper.h |
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h |
index 7b0ff13c929168030b4268cbd594dca5c77696ae..8dd771100bd814bded3345f691479189a6b21cb2 100644 |
--- a/chrome/browser/ui/search/search_tab_helper.h |
+++ b/chrome/browser/ui/search/search_tab_helper.h |
@@ -5,9 +5,12 @@ |
#ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
#define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
+#include <vector> |
+ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "chrome/browser/ui/search/search_model.h" |
+#include "chrome/common/instant_types.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_contents_observer.h" |
@@ -42,6 +45,11 @@ class SearchTabHelper : public content::NotificationObserver, |
// the notification system and shouldn't call this method. |
void NavigationEntryUpdated(); |
+ // Updates |last_known_most_visited_items_| with |items|. |
+ // Returns false if |items| matches the |last_known_most_visited_items_|. |
+ bool UpdateLastKnownMostVisitedItems( |
+ const std::vector<InstantMostVisitedItem>& items); |
+ |
private: |
friend class content::WebContentsUserData<SearchTabHelper>; |
@@ -77,6 +85,10 @@ class SearchTabHelper : public content::NotificationObserver, |
content::WebContents* web_contents_; |
+ // Tracks the last set of most visited items sent to the InstantPage renderer. |
+ // Used to prevent sending duplicate IPC messages to the renderer. |
+ std::vector<InstantMostVisitedItem> last_known_most_visited_items_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
}; |