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