| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 virtual bool ShouldProcessDeleteMostVisitedItem() = 0; | 103 virtual bool ShouldProcessDeleteMostVisitedItem() = 0; |
| 104 virtual bool ShouldProcessUndoMostVisitedDeletion() = 0; | 104 virtual bool ShouldProcessUndoMostVisitedDeletion() = 0; |
| 105 virtual bool ShouldProcessUndoAllMostVisitedDeletions() = 0; | 105 virtual bool ShouldProcessUndoAllMostVisitedDeletions() = 0; |
| 106 virtual bool ShouldProcessLogEvent() = 0; | 106 virtual bool ShouldProcessLogEvent() = 0; |
| 107 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) = 0; | 107 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) = 0; |
| 108 virtual bool ShouldProcessChromeIdentityCheck() = 0; | 108 virtual bool ShouldProcessChromeIdentityCheck() = 0; |
| 109 virtual bool ShouldProcessHistorySyncCheck() = 0; | 109 virtual bool ShouldProcessHistorySyncCheck() = 0; |
| 110 virtual bool ShouldSendSetPromoInformation() = 0; | 110 virtual bool ShouldSendSetPromoInformation() = 0; |
| 111 virtual bool ShouldSendSetDisplayInstantResults() = 0; | 111 virtual bool ShouldSendSetDisplayInstantResults() = 0; |
| 112 virtual bool ShouldSendSetSuggestionToPrefetch() = 0; | 112 virtual bool ShouldSendSetSuggestionToPrefetch() = 0; |
| 113 virtual bool ShouldSendSetOmniboxStartMargin() = 0; | |
| 114 virtual bool ShouldSendSetInputInProgress(bool is_active_tab) = 0; | 113 virtual bool ShouldSendSetInputInProgress(bool is_active_tab) = 0; |
| 115 virtual bool ShouldSendOmniboxFocusChanged() = 0; | 114 virtual bool ShouldSendOmniboxFocusChanged() = 0; |
| 116 virtual bool ShouldSendMostVisitedItems() = 0; | 115 virtual bool ShouldSendMostVisitedItems() = 0; |
| 117 virtual bool ShouldSendThemeBackgroundInfo() = 0; | 116 virtual bool ShouldSendThemeBackgroundInfo() = 0; |
| 118 virtual bool ShouldSubmitQuery() = 0; | 117 virtual bool ShouldSubmitQuery() = 0; |
| 119 }; | 118 }; |
| 120 | 119 |
| 121 SearchIPCRouter(content::WebContents* web_contents, Delegate* delegate, | 120 SearchIPCRouter(content::WebContents* web_contents, Delegate* delegate, |
| 122 scoped_ptr<Policy> policy); | 121 scoped_ptr<Policy> policy); |
| 123 ~SearchIPCRouter() override; | 122 ~SearchIPCRouter() override; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 139 | 138 |
| 140 // Tells the renderer information it needs to display promos. | 139 // Tells the renderer information it needs to display promos. |
| 141 void SetPromoInformation(bool is_app_launcher_enabled); | 140 void SetPromoInformation(bool is_app_launcher_enabled); |
| 142 | 141 |
| 143 // Tells the renderer whether to display the Instant results. | 142 // Tells the renderer whether to display the Instant results. |
| 144 void SetDisplayInstantResults(); | 143 void SetDisplayInstantResults(); |
| 145 | 144 |
| 146 // Tells the page the suggestion to be prefetched if any. | 145 // Tells the page the suggestion to be prefetched if any. |
| 147 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 146 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 148 | 147 |
| 149 // Tells the page the left margin of the omnibox. This is used by the page to | |
| 150 // align text or assets properly with the omnibox. | |
| 151 void SetOmniboxStartMargin(int start_margin); | |
| 152 | |
| 153 // Tells the page that user input started or stopped. | 148 // Tells the page that user input started or stopped. |
| 154 void SetInputInProgress(bool input_in_progress); | 149 void SetInputInProgress(bool input_in_progress); |
| 155 | 150 |
| 156 // Tells the page that the omnibox focus has changed. | 151 // Tells the page that the omnibox focus has changed. |
| 157 void OmniboxFocusChanged(OmniboxFocusState state, | 152 void OmniboxFocusChanged(OmniboxFocusState state, |
| 158 OmniboxFocusChangeReason reason); | 153 OmniboxFocusChangeReason reason); |
| 159 | 154 |
| 160 // Tells the renderer about the most visited items. | 155 // Tells the renderer about the most visited items. |
| 161 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items); | 156 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items); |
| 162 | 157 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // SearchIPCRouter to ensure that delayed IPC replies are ignored. | 229 // SearchIPCRouter to ensure that delayed IPC replies are ignored. |
| 235 int commit_counter_; | 230 int commit_counter_; |
| 236 | 231 |
| 237 // Set to true, when the tab corresponding to |this| instance is active. | 232 // Set to true, when the tab corresponding to |this| instance is active. |
| 238 bool is_active_tab_; | 233 bool is_active_tab_; |
| 239 | 234 |
| 240 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); | 235 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); |
| 241 }; | 236 }; |
| 242 | 237 |
| 243 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 238 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| OLD | NEW |