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_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 5 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 void NavigateToURL(const GURL& url, | 114 void NavigateToURL(const GURL& url, |
115 WindowOpenDisposition disposition, | 115 WindowOpenDisposition disposition, |
116 bool is_most_visited_item_url); | 116 bool is_most_visited_item_url); |
117 | 117 |
118 // Sends ChromeViewHostMsg_SearchBoxPaste to the browser. | 118 // Sends ChromeViewHostMsg_SearchBoxPaste to the browser. |
119 void Paste(const base::string16& text); | 119 void Paste(const base::string16& text); |
120 | 120 |
121 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); | 121 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); |
122 const EmbeddedSearchRequestParams& GetEmbeddedSearchRequestParams(); | 122 const EmbeddedSearchRequestParams& GetEmbeddedSearchRequestParams(); |
123 | 123 |
| 124 // Sends ChromeViewHostMsg_SetVoiceSearchSupported to the browser. |
| 125 void SetVoiceSearchSupported(bool supported); |
| 126 |
124 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser. | 127 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser. |
125 void StartCapturingKeyStrokes(); | 128 void StartCapturingKeyStrokes(); |
126 | 129 |
127 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser. | 130 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser. |
128 void StopCapturingKeyStrokes(); | 131 void StopCapturingKeyStrokes(); |
129 | 132 |
130 // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the | 133 // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the |
131 // browser. | 134 // browser. |
132 void UndoAllMostVisitedDeletions(); | 135 void UndoAllMostVisitedDeletions(); |
133 | 136 |
(...skipping 23 matching lines...) Expand all Loading... |
157 void OnMarginChange(int margin); | 160 void OnMarginChange(int margin); |
158 void OnMostVisitedChanged( | 161 void OnMostVisitedChanged( |
159 const std::vector<InstantMostVisitedItem>& items); | 162 const std::vector<InstantMostVisitedItem>& items); |
160 void OnPromoInformationReceived(bool is_app_launcher_enabled); | 163 void OnPromoInformationReceived(bool is_app_launcher_enabled); |
161 void OnSetDisplayInstantResults(bool display_instant_results); | 164 void OnSetDisplayInstantResults(bool display_instant_results); |
162 void OnSetInputInProgress(bool input_in_progress); | 165 void OnSetInputInProgress(bool input_in_progress); |
163 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 166 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
164 void OnSubmit(const base::string16& query, | 167 void OnSubmit(const base::string16& query, |
165 const EmbeddedSearchRequestParams& params); | 168 const EmbeddedSearchRequestParams& params); |
166 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 169 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 170 void OnToggleVoiceSearch(); |
167 | 171 |
168 // Returns the current zoom factor of the render view or 1 on failure. | 172 // Returns the current zoom factor of the render view or 1 on failure. |
169 double GetZoom() const; | 173 double GetZoom() const; |
170 | 174 |
171 // Sets the searchbox values to their initial value. | 175 // Sets the searchbox values to their initial value. |
172 void Reset(); | 176 void Reset(); |
173 | 177 |
174 // Returns the URL of the Most Visited item specified by the |item_id|. | 178 // Returns the URL of the Most Visited item specified by the |item_id|. |
175 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; | 179 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; |
176 | 180 |
177 int page_seq_no_; | 181 int page_seq_no_; |
178 bool app_launcher_enabled_; | 182 bool app_launcher_enabled_; |
179 bool is_focused_; | 183 bool is_focused_; |
180 bool is_input_in_progress_; | 184 bool is_input_in_progress_; |
181 bool is_key_capture_enabled_; | 185 bool is_key_capture_enabled_; |
182 bool display_instant_results_; | 186 bool display_instant_results_; |
183 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 187 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
184 ThemeBackgroundInfo theme_info_; | 188 ThemeBackgroundInfo theme_info_; |
185 base::string16 query_; | 189 base::string16 query_; |
186 EmbeddedSearchRequestParams embedded_search_request_params_; | 190 EmbeddedSearchRequestParams embedded_search_request_params_; |
187 int start_margin_; | 191 int start_margin_; |
188 InstantSuggestion suggestion_; | 192 InstantSuggestion suggestion_; |
189 | 193 |
190 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 194 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
191 }; | 195 }; |
192 | 196 |
193 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 197 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
OLD | NEW |