| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 PageURLDoesntBelongToInstantRenderer); | 112 PageURLDoesntBelongToInstantRenderer); |
| 113 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 113 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 114 OnChromeIdentityCheckMatch); | 114 OnChromeIdentityCheckMatch); |
| 115 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 115 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 116 OnChromeIdentityCheckMismatch); | 116 OnChromeIdentityCheckMismatch); |
| 117 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 117 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 118 OnChromeIdentityCheckSignedOutMatch); | 118 OnChromeIdentityCheckSignedOutMatch); |
| 119 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 119 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 120 OnChromeIdentityCheckSignedOutMismatch); | 120 OnChromeIdentityCheckSignedOutMismatch); |
| 121 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 121 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 122 OnChromeIdentityCheckMatchNotSyncing); | 122 OnHistorySyncCheckSyncInactive); |
| 123 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 124 OnHistorySyncCheckSyncing); |
| 125 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 126 OnHistorySyncCheckNotSyncing); |
| 123 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperWindowTest, | 127 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperWindowTest, |
| 124 OnProvisionalLoadFailRedirectNTPToLocal); | 128 OnProvisionalLoadFailRedirectNTPToLocal); |
| 125 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperWindowTest, | 129 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperWindowTest, |
| 126 OnProvisionalLoadFailDontRedirectIfAborted); | 130 OnProvisionalLoadFailDontRedirectIfAborted); |
| 127 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperWindowTest, | 131 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperWindowTest, |
| 128 OnProvisionalLoadFailDontRedirectNonNTP); | 132 OnProvisionalLoadFailDontRedirectNonNTP); |
| 129 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterTest, | 133 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterTest, |
| 130 IgnoreMessageIfThePageIsNotActive); | 134 IgnoreMessageIfThePageIsNotActive); |
| 131 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterTest, | 135 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterTest, |
| 132 DoNotSendSetDisplayInstantResultsMsg); | 136 DoNotSendSetDisplayInstantResultsMsg); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 void OnDeleteMostVisitedItem(const GURL& url) override; | 172 void OnDeleteMostVisitedItem(const GURL& url) override; |
| 169 void OnUndoMostVisitedDeletion(const GURL& url) override; | 173 void OnUndoMostVisitedDeletion(const GURL& url) override; |
| 170 void OnUndoAllMostVisitedDeletions() override; | 174 void OnUndoAllMostVisitedDeletions() override; |
| 171 void OnLogEvent(NTPLoggingEventType event) override; | 175 void OnLogEvent(NTPLoggingEventType event) override; |
| 172 void OnLogMostVisitedImpression(int position, | 176 void OnLogMostVisitedImpression(int position, |
| 173 const base::string16& provider) override; | 177 const base::string16& provider) override; |
| 174 void OnLogMostVisitedNavigation(int position, | 178 void OnLogMostVisitedNavigation(int position, |
| 175 const base::string16& provider) override; | 179 const base::string16& provider) override; |
| 176 void PasteIntoOmnibox(const base::string16& text) override; | 180 void PasteIntoOmnibox(const base::string16& text) override; |
| 177 void OnChromeIdentityCheck(const base::string16& identity) override; | 181 void OnChromeIdentityCheck(const base::string16& identity) override; |
| 182 void OnHistorySyncCheck() override; |
| 178 | 183 |
| 179 // Overridden from InstantServiceObserver: | 184 // Overridden from InstantServiceObserver: |
| 180 void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) override; | 185 void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) override; |
| 181 void MostVisitedItemsChanged( | 186 void MostVisitedItemsChanged( |
| 182 const std::vector<InstantMostVisitedItem>& items) override; | 187 const std::vector<InstantMostVisitedItem>& items) override; |
| 183 void OmniboxStartMarginChanged(int omnibox_start_margin) override; | 188 void OmniboxStartMarginChanged(int omnibox_start_margin) override; |
| 184 | 189 |
| 185 // Sets the mode of the model based on the current URL of web_contents(). | 190 // Sets the mode of the model based on the current URL of web_contents(). |
| 186 // Only updates the origin part of the mode if |update_origin| is true, | 191 // Only updates the origin part of the mode if |update_origin| is true, |
| 187 // otherwise keeps the current origin. If |is_preloaded_ntp| is true, the mode | 192 // otherwise keeps the current origin. If |is_preloaded_ntp| is true, the mode |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 SearchTabHelperDelegate* delegate_; | 238 SearchTabHelperDelegate* delegate_; |
| 234 | 239 |
| 235 // Function to check if the omnibox has focus. Tests use this to modify the | 240 // Function to check if the omnibox has focus. Tests use this to modify the |
| 236 // default behavior. | 241 // default behavior. |
| 237 OmniboxHasFocusFn omnibox_has_focus_fn_; | 242 OmniboxHasFocusFn omnibox_has_focus_fn_; |
| 238 | 243 |
| 239 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 244 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 240 }; | 245 }; |
| 241 | 246 |
| 242 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 247 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |