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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool verbatim() const { return verbatim_; } | 69 bool verbatim() const { return verbatim_; } |
70 bool query_is_restricted() const { return query_is_restricted_; } | 70 bool query_is_restricted() const { return query_is_restricted_; } |
71 size_t selection_start() const { return selection_start_; } | 71 size_t selection_start() const { return selection_start_; } |
72 size_t selection_end() const { return selection_end_; } | 72 size_t selection_end() const { return selection_end_; } |
73 bool is_focused() const { return is_focused_; } | 73 bool is_focused() const { return is_focused_; } |
74 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } | 74 bool is_key_capture_enabled() const { return is_key_capture_enabled_; } |
75 bool is_input_in_progress() const { return is_input_in_progress_; } | 75 bool is_input_in_progress() const { return is_input_in_progress_; } |
76 bool display_instant_results() const { return display_instant_results_; } | 76 bool display_instant_results() const { return display_instant_results_; } |
77 const string16& omnibox_font() const { return omnibox_font_; } | 77 const string16& omnibox_font() const { return omnibox_font_; } |
78 size_t omnibox_font_size() const { return omnibox_font_size_; } | 78 size_t omnibox_font_size() const { return omnibox_font_size_; } |
| 79 bool app_launcher_enabled() const { return app_launcher_enabled_; } |
79 | 80 |
80 // In extended Instant, returns the start-edge margin of the location bar in | 81 // In extended Instant, returns the start-edge margin of the location bar in |
81 // screen pixels. | 82 // screen pixels. |
82 int GetStartMargin() const; | 83 int GetStartMargin() const; |
83 | 84 |
84 // Returns the bounds of the omnibox popup in screen coordinates. | 85 // Returns the bounds of the omnibox popup in screen coordinates. |
85 gfx::Rect GetPopupBounds() const; | 86 gfx::Rect GetPopupBounds() const; |
86 | 87 |
87 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); | 88 const ThemeBackgroundInfo& GetThemeBackgroundInfo(); |
88 | 89 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 size_t selection_start, | 162 size_t selection_start, |
162 size_t selection_end); | 163 size_t selection_end); |
163 void OnFocusChanged(OmniboxFocusState new_focus_state, | 164 void OnFocusChanged(OmniboxFocusState new_focus_state, |
164 OmniboxFocusChangeReason reason); | 165 OmniboxFocusChangeReason reason); |
165 void OnSetInputInProgress(bool input_in_progress); | 166 void OnSetInputInProgress(bool input_in_progress); |
166 void OnSetDisplayInstantResults(bool display_instant_results); | 167 void OnSetDisplayInstantResults(bool display_instant_results); |
167 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 168 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
168 void OnThemeAreaHeightChanged(int height); | 169 void OnThemeAreaHeightChanged(int height); |
169 void OnFontInformationReceived(const string16& omnibox_font, | 170 void OnFontInformationReceived(const string16& omnibox_font, |
170 size_t omnibox_font_size); | 171 size_t omnibox_font_size); |
| 172 void OnPromoInformationReceived(bool is_app_launcher_enabled); |
171 void OnMostVisitedChanged( | 173 void OnMostVisitedChanged( |
172 const std::vector<InstantMostVisitedItem>& items); | 174 const std::vector<InstantMostVisitedItem>& items); |
173 void OnToggleVoiceSearch(); | 175 void OnToggleVoiceSearch(); |
174 | 176 |
175 // Returns the current zoom factor of the render view or 1 on failure. | 177 // Returns the current zoom factor of the render view or 1 on failure. |
176 double GetZoom() const; | 178 double GetZoom() const; |
177 | 179 |
178 // Sets the searchbox values to their initial value. | 180 // Sets the searchbox values to their initial value. |
179 void Reset(); | 181 void Reset(); |
180 | 182 |
(...skipping 10 matching lines...) Expand all Loading... |
191 size_t selection_end_; | 193 size_t selection_end_; |
192 int start_margin_; | 194 int start_margin_; |
193 gfx::Rect popup_bounds_; | 195 gfx::Rect popup_bounds_; |
194 bool is_focused_; | 196 bool is_focused_; |
195 bool is_key_capture_enabled_; | 197 bool is_key_capture_enabled_; |
196 bool is_input_in_progress_; | 198 bool is_input_in_progress_; |
197 ThemeBackgroundInfo theme_info_; | 199 ThemeBackgroundInfo theme_info_; |
198 bool display_instant_results_; | 200 bool display_instant_results_; |
199 string16 omnibox_font_; | 201 string16 omnibox_font_; |
200 size_t omnibox_font_size_; | 202 size_t omnibox_font_size_; |
| 203 bool app_launcher_enabled_; |
201 InstantRestrictedIDCache<InstantAutocompleteResult> | 204 InstantRestrictedIDCache<InstantAutocompleteResult> |
202 autocomplete_results_cache_; | 205 autocomplete_results_cache_; |
203 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; | 206 InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_items_cache_; |
204 | 207 |
205 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 208 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
206 }; | 209 }; |
207 | 210 |
208 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 211 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
OLD | NEW |