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