| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } | 109 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } |
| 110 bool display_instant_results() const { return display_instant_results_; } | 110 bool display_instant_results() const { return display_instant_results_; } |
| 111 const base::string16& query() const { return query_; } | 111 const base::string16& query() const { return query_; } |
| 112 int start_margin() const { return start_margin_; } | 112 int start_margin() const { return start_margin_; } |
| 113 const InstantSuggestion& suggestion() const { return suggestion_; } | 113 const InstantSuggestion& suggestion() const { return suggestion_; } |
| 114 | 114 |
| 115 private: | 115 private: |
| 116 // Overridden from content::RenderViewObserver: | 116 // Overridden from content::RenderViewObserver: |
| 117 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 117 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 118 | 118 |
| 119 void OnSetPageSequenceNumber(int page_seq_no); |
| 119 void OnChromeIdentityCheckResult(const base::string16& identity, | 120 void OnChromeIdentityCheckResult(const base::string16& identity, |
| 120 bool identity_match); | 121 bool identity_match); |
| 121 void OnDetermineIfPageSupportsInstant(); | 122 void OnDetermineIfPageSupportsInstant(); |
| 122 void OnFocusChanged(OmniboxFocusState new_focus_state, | 123 void OnFocusChanged(OmniboxFocusState new_focus_state, |
| 123 OmniboxFocusChangeReason reason); | 124 OmniboxFocusChangeReason reason); |
| 124 void OnMarginChange(int margin); | 125 void OnMarginChange(int margin); |
| 125 void OnMostVisitedChanged( | 126 void OnMostVisitedChanged( |
| 126 const std::vector<InstantMostVisitedItem>& items); | 127 const std::vector<InstantMostVisitedItem>& items); |
| 127 void OnPromoInformationReceived(bool is_app_launcher_enabled); | 128 void OnPromoInformationReceived(bool is_app_launcher_enabled); |
| 128 void OnSetDisplayInstantResults(bool display_instant_results); | 129 void OnSetDisplayInstantResults(bool display_instant_results); |
| 129 void OnSetInputInProgress(bool input_in_progress); | 130 void OnSetInputInProgress(bool input_in_progress); |
| 130 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); | 131 void OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion); |
| 131 void OnSubmit(const base::string16& query); | 132 void OnSubmit(const base::string16& query); |
| 132 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 133 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 133 void OnToggleVoiceSearch(); | 134 void OnToggleVoiceSearch(); |
| 134 | 135 |
| 135 // Returns the current zoom factor of the render view or 1 on failure. | 136 // Returns the current zoom factor of the render view or 1 on failure. |
| 136 double GetZoom() const; | 137 double GetZoom() const; |
| 137 | 138 |
| 138 // Sets the searchbox values to their initial value. | 139 // Sets the searchbox values to their initial value. |
| 139 void Reset(); | 140 void Reset(); |
| 140 | 141 |
| 141 // Returns the URL of the Most Visited item specified by the |item_id|. | 142 // Returns the URL of the Most Visited item specified by the |item_id|. |
| 142 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; | 143 GURL GetURLForMostVisitedItem(InstantRestrictedID item_id) const; |
| 143 | 144 |
| 145 int page_seq_no_; |
| 144 bool app_launcher_enabled_; | 146 bool app_launcher_enabled_; |
| 145 bool is_focused_; | 147 bool is_focused_; |
| 146 bool is_input_in_progress_; | 148 bool is_input_in_progress_; |
| 147 bool is_key_capture_enabled_; | 149 bool is_key_capture_enabled_; |
| 148 bool display_instant_results_; | 150 bool display_instant_results_; |
| 149 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 151 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
| 150 ThemeBackgroundInfo theme_info_; | 152 ThemeBackgroundInfo theme_info_; |
| 151 base::string16 query_; | 153 base::string16 query_; |
| 152 int start_margin_; | 154 int start_margin_; |
| 153 InstantSuggestion suggestion_; | 155 InstantSuggestion suggestion_; |
| 154 | 156 |
| 155 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 157 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 160 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
| OLD | NEW |