| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // the notification system and shouldn't call this method. | 59 // the notification system and shouldn't call this method. |
| 60 void NavigationEntryUpdated(); | 60 void NavigationEntryUpdated(); |
| 61 | 61 |
| 62 // Invoked to update the instant support state. | 62 // Invoked to update the instant support state. |
| 63 void InstantSupportChanged(bool supports_instant); | 63 void InstantSupportChanged(bool supports_instant); |
| 64 | 64 |
| 65 // Returns true if the page supports instant. If the instant support state is | 65 // Returns true if the page supports instant. If the instant support state is |
| 66 // not determined or if the page does not support instant returns false. | 66 // not determined or if the page does not support instant returns false. |
| 67 bool SupportsInstant() const; | 67 bool SupportsInstant() const; |
| 68 | 68 |
| 69 // Sends the current SearchProvider suggestion to the Instant page if any. |
| 70 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 71 |
| 69 private: | 72 private: |
| 70 friend class content::WebContentsUserData<SearchTabHelper>; | 73 friend class content::WebContentsUserData<SearchTabHelper>; |
| 71 friend class InstantPageTest; | 74 friend class InstantPageTest; |
| 72 friend class SearchIPCRouterTest; | 75 friend class SearchIPCRouterTest; |
| 73 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 76 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 74 DetermineIfPageSupportsInstant_Local); | 77 DetermineIfPageSupportsInstant_Local); |
| 75 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 78 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 76 DetermineIfPageSupportsInstant_NonLocal); | 79 DetermineIfPageSupportsInstant_NonLocal); |
| 77 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, | 80 FRIEND_TEST_ALL_PREFIXES(SearchTabHelperTest, |
| 78 PageURLDoesntBelongToInstantRenderer); | 81 PageURLDoesntBelongToInstantRenderer); |
| 79 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 82 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 80 ProcessVoiceSearchSupportMsg); | 83 ProcessVoiceSearchSupportMsg); |
| 81 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 84 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 82 SendSetDisplayInstantResults); | 85 SendSetDisplayInstantResults); |
| 83 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 86 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 84 DoNotSetDisplayInstantResultsForIncognitoPage); | 87 SendSetSuggestionToPrefetch); |
| 88 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 89 DoNotSendSetMessagesForIncognitoPage); |
| 85 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, SendMostVisitedItems); | 90 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, SendMostVisitedItems); |
| 86 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 91 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 87 DoNotSendMostVisitedItems); | 92 DoNotSendMostVisitedItems); |
| 88 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 93 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 89 DoNotSendMostVisitedItemsForIncognitoPage); | 94 DoNotSendMostVisitedItemsForIncognitoPage); |
| 90 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, SendThemeBackgroundInfo); | 95 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, SendThemeBackgroundInfo); |
| 91 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 96 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 92 DoNotSendThemeBackgroundInfo); | 97 DoNotSendThemeBackgroundInfo); |
| 93 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, | 98 FRIEND_TEST_ALL_PREFIXES(SearchIPCRouterPolicyTest, |
| 94 DoNotSendThemeBackgroundInfoForIncognitoPage); | 99 DoNotSendThemeBackgroundInfoForIncognitoPage); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 content::WebContents* web_contents_; | 186 content::WebContents* web_contents_; |
| 182 | 187 |
| 183 SearchIPCRouter ipc_router_; | 188 SearchIPCRouter ipc_router_; |
| 184 | 189 |
| 185 InstantService* instant_service_; | 190 InstantService* instant_service_; |
| 186 | 191 |
| 187 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 192 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 188 }; | 193 }; |
| 189 | 194 |
| 190 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 195 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |