| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IPC_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // SearchIPCRouter calls these functions before sending/receiving messages | 93 // SearchIPCRouter calls these functions before sending/receiving messages |
| 94 // to/from the page. | 94 // to/from the page. |
| 95 virtual bool ShouldProcessFocusOmnibox(bool is_active_tab) = 0; | 95 virtual bool ShouldProcessFocusOmnibox(bool is_active_tab) = 0; |
| 96 virtual bool ShouldProcessDeleteMostVisitedItem() = 0; | 96 virtual bool ShouldProcessDeleteMostVisitedItem() = 0; |
| 97 virtual bool ShouldProcessUndoMostVisitedDeletion() = 0; | 97 virtual bool ShouldProcessUndoMostVisitedDeletion() = 0; |
| 98 virtual bool ShouldProcessUndoAllMostVisitedDeletions() = 0; | 98 virtual bool ShouldProcessUndoAllMostVisitedDeletions() = 0; |
| 99 virtual bool ShouldProcessLogEvent() = 0; | 99 virtual bool ShouldProcessLogEvent() = 0; |
| 100 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) = 0; | 100 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) = 0; |
| 101 virtual bool ShouldProcessChromeIdentityCheck() = 0; | 101 virtual bool ShouldProcessChromeIdentityCheck() = 0; |
| 102 virtual bool ShouldProcessHistorySyncCheck() = 0; | 102 virtual bool ShouldProcessHistorySyncCheck() = 0; |
| 103 virtual bool ShouldSendSetPromoInformation() = 0; | |
| 104 virtual bool ShouldSendSetDisplayInstantResults() = 0; | 103 virtual bool ShouldSendSetDisplayInstantResults() = 0; |
| 105 virtual bool ShouldSendSetSuggestionToPrefetch() = 0; | 104 virtual bool ShouldSendSetSuggestionToPrefetch() = 0; |
| 106 virtual bool ShouldSendSetInputInProgress(bool is_active_tab) = 0; | 105 virtual bool ShouldSendSetInputInProgress(bool is_active_tab) = 0; |
| 107 virtual bool ShouldSendOmniboxFocusChanged() = 0; | 106 virtual bool ShouldSendOmniboxFocusChanged() = 0; |
| 108 virtual bool ShouldSendMostVisitedItems() = 0; | 107 virtual bool ShouldSendMostVisitedItems() = 0; |
| 109 virtual bool ShouldSendThemeBackgroundInfo() = 0; | 108 virtual bool ShouldSendThemeBackgroundInfo() = 0; |
| 110 virtual bool ShouldSubmitQuery() = 0; | 109 virtual bool ShouldSubmitQuery() = 0; |
| 111 }; | 110 }; |
| 112 | 111 |
| 113 SearchIPCRouter(content::WebContents* web_contents, | 112 SearchIPCRouter(content::WebContents* web_contents, |
| 114 Delegate* delegate, | 113 Delegate* delegate, |
| 115 std::unique_ptr<Policy> policy); | 114 std::unique_ptr<Policy> policy); |
| 116 ~SearchIPCRouter() override; | 115 ~SearchIPCRouter() override; |
| 117 | 116 |
| 118 // Tells the SearchIPCRouter that a new page in an Instant process committed. | 117 // Tells the SearchIPCRouter that a new page in an Instant process committed. |
| 119 void OnNavigationEntryCommitted(); | 118 void OnNavigationEntryCommitted(); |
| 120 | 119 |
| 121 // Tells the renderer to determine if the page supports the Instant API, which | 120 // Tells the renderer to determine if the page supports the Instant API, which |
| 122 // results in a call to OnInstantSupportDetermined() when the reply is | 121 // results in a call to OnInstantSupportDetermined() when the reply is |
| 123 // received. | 122 // received. |
| 124 void DetermineIfPageSupportsInstant(); | 123 void DetermineIfPageSupportsInstant(); |
| 125 | 124 |
| 126 // Tells the renderer about the result of the Chrome identity check. | 125 // Tells the renderer about the result of the Chrome identity check. |
| 127 void SendChromeIdentityCheckResult(const base::string16& identity, | 126 void SendChromeIdentityCheckResult(const base::string16& identity, |
| 128 bool identity_match); | 127 bool identity_match); |
| 129 | 128 |
| 130 // Tells the renderer whether the user syncs history. | 129 // Tells the renderer whether the user syncs history. |
| 131 void SendHistorySyncCheckResult(bool sync_history); | 130 void SendHistorySyncCheckResult(bool sync_history); |
| 132 | 131 |
| 133 // Tells the renderer information it needs to display promos. | |
| 134 void SetPromoInformation(bool is_app_launcher_enabled); | |
| 135 | |
| 136 // Tells the renderer whether to display the Instant results. | 132 // Tells the renderer whether to display the Instant results. |
| 137 void SetDisplayInstantResults(); | 133 void SetDisplayInstantResults(); |
| 138 | 134 |
| 139 // Tells the page the suggestion to be prefetched if any. | 135 // Tells the page the suggestion to be prefetched if any. |
| 140 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 136 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 141 | 137 |
| 142 // Tells the page that user input started or stopped. | 138 // Tells the page that user input started or stopped. |
| 143 void SetInputInProgress(bool input_in_progress); | 139 void SetInputInProgress(bool input_in_progress); |
| 144 | 140 |
| 145 // Tells the page that the omnibox focus has changed. | 141 // Tells the page that the omnibox focus has changed. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // SearchIPCRouter to ensure that delayed IPC replies are ignored. | 215 // SearchIPCRouter to ensure that delayed IPC replies are ignored. |
| 220 int commit_counter_; | 216 int commit_counter_; |
| 221 | 217 |
| 222 // Set to true, when the tab corresponding to |this| instance is active. | 218 // Set to true, when the tab corresponding to |this| instance is active. |
| 223 bool is_active_tab_; | 219 bool is_active_tab_; |
| 224 | 220 |
| 225 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); | 221 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); |
| 226 }; | 222 }; |
| 227 | 223 |
| 228 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 224 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| OLD | NEW |