| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 // Sends ChromeViewHostMsg_SearchBoxNavigate to the browser. | 80 // Sends ChromeViewHostMsg_SearchBoxNavigate to the browser. |
| 81 void NavigateToURL(const GURL& url, | 81 void NavigateToURL(const GURL& url, |
| 82 WindowOpenDisposition disposition, | 82 WindowOpenDisposition disposition, |
| 83 bool is_most_visited_item_url); | 83 bool is_most_visited_item_url); |
| 84 | 84 |
| 85 // Sends ChromeViewHostMsg_SearchBoxPaste to the browser. | 85 // Sends ChromeViewHostMsg_SearchBoxPaste to the browser. |
| 86 void Paste(const base::string16& text); | 86 void Paste(const base::string16& text); |
| 87 | 87 |
| 88 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); | 88 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); |
| 89 const EmbeddedSearchRequestParams& GetEmbeddedSearchRequestParams(); |
| 89 | 90 |
| 90 // Sends ChromeViewHostMsg_SetVoiceSearchSupported to the browser. | 91 // Sends ChromeViewHostMsg_SetVoiceSearchSupported to the browser. |
| 91 void SetVoiceSearchSupported(bool supported); | 92 void SetVoiceSearchSupported(bool supported); |
| 92 | 93 |
| 93 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser. | 94 // Sends ChromeViewHostMsg_StartCapturingKeyStrokes to the browser. |
| 94 void StartCapturingKeyStrokes(); | 95 void StartCapturingKeyStrokes(); |
| 95 | 96 |
| 96 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser. | 97 // Sends ChromeViewHostMsg_StopCapturingKeyStrokes to the browser. |
| 97 void StopCapturingKeyStrokes(); | 98 void StopCapturingKeyStrokes(); |
| 98 | 99 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 122 void OnDetermineIfPageSupportsInstant(); | 123 void OnDetermineIfPageSupportsInstant(); |
| 123 void OnFocusChanged(OmniboxFocusState new_focus_state, | 124 void OnFocusChanged(OmniboxFocusState new_focus_state, |
| 124 OmniboxFocusChangeReason reason); | 125 OmniboxFocusChangeReason reason); |
| 125 void OnMarginChange(int margin); | 126 void OnMarginChange(int margin); |
| 126 void OnMostVisitedChanged( | 127 void OnMostVisitedChanged( |
| 127 const std::vector<InstantMostVisitedItem>& items); | 128 const std::vector<InstantMostVisitedItem>& items); |
| 128 void OnPromoInformationReceived(bool is_app_launcher_enabled); | 129 void OnPromoInformationReceived(bool is_app_launcher_enabled); |
| 129 void OnSetDisplayInstantResults(bool display_instant_results); | 130 void OnSetDisplayInstantResults(bool display_instant_results); |
| 130 void OnSetInputInProgress(bool input_in_progress); | 131 void OnSetInputInProgress(bool input_in_progress); |
| 131 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 132 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 132 void OnSubmit(const base::string16& query); | 133 void OnSubmit(const base::string16& query, |
| 134 const EmbeddedSearchRequestParams& params); |
| 133 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 135 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 134 void OnToggleVoiceSearch(); | 136 void OnToggleVoiceSearch(); |
| 135 | 137 |
| 136 // Returns the current zoom factor of the render view or 1 on failure. | 138 // Returns the current zoom factor of the render view or 1 on failure. |
| 137 double GetZoom() const; | 139 double GetZoom() const; |
| 138 | 140 |
| 139 // Sets the searchbox values to their initial value. | 141 // Sets the searchbox values to their initial value. |
| 140 void Reset(); | 142 void Reset(); |
| 141 | 143 |
| 142 // Returns the URL of the Most Visited item specified by the |item_id|. | 144 // Returns the URL of the Most Visited item specified by the |item_id|. |
| 143 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; | 145 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; |
| 144 | 146 |
| 145 int page_seq_no_; | 147 int page_seq_no_; |
| 146 bool app_launcher_enabled_; | 148 bool app_launcher_enabled_; |
| 147 bool is_focused_; | 149 bool is_focused_; |
| 148 bool is_input_in_progress_; | 150 bool is_input_in_progress_; |
| 149 bool is_key_capture_enabled_; | 151 bool is_key_capture_enabled_; |
| 150 bool display_instant_results_; | 152 bool display_instant_results_; |
| 151 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 153 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
| 152 ThemeBackgroundInfo theme_info_; | 154 ThemeBackgroundInfo theme_info_; |
| 153 base::string16 query_; | 155 base::string16 query_; |
| 156 EmbeddedSearchRequestParams embedded_search_request_params_; |
| 154 int start_margin_; | 157 int start_margin_; |
| 155 InstantSuggestion suggestion_; | 158 InstantSuggestion suggestion_; |
| 156 | 159 |
| 157 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 160 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 158 }; | 161 }; |
| 159 | 162 |
| 160 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 163 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |