| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // affect the search mode. This is used by Instant when it "fixes up" the | 43 // affect the search mode. This is used by Instant when it "fixes up" the |
| 44 // virtual URL of the active entry. Regular navigations are captured through | 44 // virtual URL of the active entry. Regular navigations are captured through |
| 45 // the notification system and shouldn't call this method. | 45 // the notification system and shouldn't call this method. |
| 46 void NavigationEntryUpdated(); | 46 void NavigationEntryUpdated(); |
| 47 | 47 |
| 48 // Updates |last_known_most_visited_items_| with |items|. | 48 // Updates |last_known_most_visited_items_| with |items|. |
| 49 // Returns false if |items| matches the |last_known_most_visited_items_|. | 49 // Returns false if |items| matches the |last_known_most_visited_items_|. |
| 50 bool UpdateLastKnownMostVisitedItems( | 50 bool UpdateLastKnownMostVisitedItems( |
| 51 const std::vector<InstantMostVisitedItem>& items); | 51 const std::vector<InstantMostVisitedItem>& items); |
| 52 | 52 |
| 53 // Updates |last_known_theme_info_| with |theme_info|. |
| 54 // Returns false if |theme_info| matches the |last_known_theme_info_|. |
| 55 bool UpdateLastKnownThemeBackgroundInfo( |
| 56 const ThemeBackgroundInfo& theme_info); |
| 57 |
| 53 private: | 58 private: |
| 54 friend class content::WebContentsUserData<SearchTabHelper>; | 59 friend class content::WebContentsUserData<SearchTabHelper>; |
| 55 | 60 |
| 56 explicit SearchTabHelper(content::WebContents* web_contents); | 61 explicit SearchTabHelper(content::WebContents* web_contents); |
| 57 | 62 |
| 58 // Overridden from content::NotificationObserver: | 63 // Overridden from content::NotificationObserver: |
| 59 virtual void Observe(int type, | 64 virtual void Observe(int type, |
| 60 const content::NotificationSource& source, | 65 const content::NotificationSource& source, |
| 61 const content::NotificationDetails& details) OVERRIDE; | 66 const content::NotificationDetails& details) OVERRIDE; |
| 62 | 67 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 82 SearchModel model_; | 87 SearchModel model_; |
| 83 | 88 |
| 84 content::NotificationRegistrar registrar_; | 89 content::NotificationRegistrar registrar_; |
| 85 | 90 |
| 86 content::WebContents* web_contents_; | 91 content::WebContents* web_contents_; |
| 87 | 92 |
| 88 // Tracks the last set of most visited items sent to the InstantPage renderer. | 93 // Tracks the last set of most visited items sent to the InstantPage renderer. |
| 89 // Used to prevent sending duplicate IPC messages to the renderer. | 94 // Used to prevent sending duplicate IPC messages to the renderer. |
| 90 std::vector<InstantMostVisitedItem> last_known_most_visited_items_; | 95 std::vector<InstantMostVisitedItem> last_known_most_visited_items_; |
| 91 | 96 |
| 97 // Tracks the last known theme background details. |
| 98 ThemeBackgroundInfo last_known_theme_info_; |
| 99 |
| 92 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 100 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 93 }; | 101 }; |
| 94 | 102 |
| 95 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 103 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |