| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser. | 134 // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser. |
| 135 void UndoMostVisitedDeletion(InstantRestrictedID most_visited_item_id); | 135 void UndoMostVisitedDeletion(InstantRestrictedID most_visited_item_id); |
| 136 | 136 |
| 137 bool app_launcher_enabled() const { return app_launcher_enabled_; } | 137 bool app_launcher_enabled() const { return app_launcher_enabled_; } |
| 138 bool is_focused() const { return is_focused_; } | 138 bool is_focused() const { return is_focused_; } |
| 139 bool is_input_in_progress() const { return is_input_in_progress_; } | 139 bool is_input_in_progress() const { return is_input_in_progress_; } |
| 140 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } | 140 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } |
| 141 bool display_instant_results() const { return display_instant_results_; } | 141 bool display_instant_results() const { return display_instant_results_; } |
| 142 const base::string16& query() const { return query_; } | 142 const base::string16& query() const { return query_; } |
| 143 int start_margin() const { return start_margin_; } | |
| 144 const InstantSuggestion& suggestion() const { return suggestion_; } | 143 const InstantSuggestion& suggestion() const { return suggestion_; } |
| 145 | 144 |
| 146 private: | 145 private: |
| 147 // Overridden from content::RenderViewObserver: | 146 // Overridden from content::RenderViewObserver: |
| 148 bool OnMessageReceived(const IPC::Message& message) override; | 147 bool OnMessageReceived(const IPC::Message& message) override; |
| 149 | 148 |
| 150 void OnSetPageSequenceNumber(int page_seq_no); | 149 void OnSetPageSequenceNumber(int page_seq_no); |
| 151 void OnChromeIdentityCheckResult(const base::string16& identity, | 150 void OnChromeIdentityCheckResult(const base::string16& identity, |
| 152 bool identity_match); | 151 bool identity_match); |
| 153 void OnDetermineIfPageSupportsInstant(); | 152 void OnDetermineIfPageSupportsInstant(); |
| 154 void OnFocusChanged(OmniboxFocusState new_focus_state, | 153 void OnFocusChanged(OmniboxFocusState new_focus_state, |
| 155 OmniboxFocusChangeReason reason); | 154 OmniboxFocusChangeReason reason); |
| 156 void OnHistorySyncCheckResult(bool sync_history); | 155 void OnHistorySyncCheckResult(bool sync_history); |
| 157 void OnMarginChange(int margin); | |
| 158 void OnMostVisitedChanged( | 156 void OnMostVisitedChanged( |
| 159 const std::vector<InstantMostVisitedItem>& items); | 157 const std::vector<InstantMostVisitedItem>& items); |
| 160 void OnPromoInformationReceived(bool is_app_launcher_enabled); | 158 void OnPromoInformationReceived(bool is_app_launcher_enabled); |
| 161 void OnSetDisplayInstantResults(bool display_instant_results); | 159 void OnSetDisplayInstantResults(bool display_instant_results); |
| 162 void OnSetInputInProgress(bool input_in_progress); | 160 void OnSetInputInProgress(bool input_in_progress); |
| 163 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 161 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 164 void OnSubmit(const base::string16& query, | 162 void OnSubmit(const base::string16& query, |
| 165 const EmbeddedSearchRequestParams& params); | 163 const EmbeddedSearchRequestParams& params); |
| 166 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 164 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 167 | 165 |
| 168 // Returns the current zoom factor of the render view or 1 on failure. | 166 // Returns the current zoom factor of the render view or 1 on failure. |
| 169 double GetZoom() const; | 167 double GetZoom() const; |
| 170 | 168 |
| 171 // Sets the searchbox values to their initial value. | 169 // Sets the searchbox values to their initial value. |
| 172 void Reset(); | 170 void Reset(); |
| 173 | 171 |
| 174 // Returns the URL of the Most Visited item specified by the |item_id|. | 172 // Returns the URL of the Most Visited item specified by the |item_id|. |
| 175 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; | 173 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; |
| 176 | 174 |
| 177 int page_seq_no_; | 175 int page_seq_no_; |
| 178 bool app_launcher_enabled_; | 176 bool app_launcher_enabled_; |
| 179 bool is_focused_; | 177 bool is_focused_; |
| 180 bool is_input_in_progress_; | 178 bool is_input_in_progress_; |
| 181 bool is_key_capture_enabled_; | 179 bool is_key_capture_enabled_; |
| 182 bool display_instant_results_; | 180 bool display_instant_results_; |
| 183 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 181 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
| 184 ThemeBackgroundInfo theme_info_; | 182 ThemeBackgroundInfo theme_info_; |
| 185 base::string16 query_; | 183 base::string16 query_; |
| 186 EmbeddedSearchRequestParams embedded_search_request_params_; | 184 EmbeddedSearchRequestParams embedded_search_request_params_; |
| 187 int start_margin_; | |
| 188 InstantSuggestion suggestion_; | 185 InstantSuggestion suggestion_; |
| 189 | 186 |
| 190 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 187 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 191 }; | 188 }; |
| 192 | 189 |
| 193 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 190 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |