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