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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void OnAutocompleteResults( | 112 void OnAutocompleteResults( |
113 const std::vector<InstantAutocompleteResult>& results); | 113 const std::vector<InstantAutocompleteResult>& results); |
114 void OnUpOrDownKeyPressed(int count); | 114 void OnUpOrDownKeyPressed(int count); |
115 void OnCancelSelection(const string16& query); | 115 void OnCancelSelection(const string16& query); |
116 void OnKeyCaptureChange(bool is_key_capture_enabled); | 116 void OnKeyCaptureChange(bool is_key_capture_enabled); |
117 void OnSetDisplayInstantResults(bool display_instant_results); | 117 void OnSetDisplayInstantResults(bool display_instant_results); |
118 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); | 118 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
119 void OnThemeAreaHeightChanged(int height); | 119 void OnThemeAreaHeightChanged(int height); |
120 void OnFontInformationReceived(const string16& omnibox_font, | 120 void OnFontInformationReceived(const string16& omnibox_font, |
121 size_t omnibox_font_size); | 121 size_t omnibox_font_size); |
122 void OnGrantChromeSearchAccessFromOrigin(const GURL& origin_url); | |
123 void OnMostVisitedChanged(const std::vector<InstantMostVisitedItem>& items); | 122 void OnMostVisitedChanged(const std::vector<InstantMostVisitedItem>& items); |
124 | 123 |
125 // Returns the current zoom factor of the render view or 1 on failure. | 124 // Returns the current zoom factor of the render view or 1 on failure. |
126 double GetZoom() const; | 125 double GetZoom() const; |
127 | 126 |
128 // Sets the searchbox values to their initial value. | 127 // Sets the searchbox values to their initial value. |
129 void Reset(); | 128 void Reset(); |
130 | 129 |
131 string16 query_; | 130 string16 query_; |
132 bool verbatim_; | 131 bool verbatim_; |
133 size_t selection_start_; | 132 size_t selection_start_; |
134 size_t selection_end_; | 133 size_t selection_end_; |
135 size_t results_base_; | 134 size_t results_base_; |
136 int start_margin_; | 135 int start_margin_; |
137 gfx::Rect popup_bounds_; | 136 gfx::Rect popup_bounds_; |
138 std::vector<InstantAutocompleteResult> autocomplete_results_; | 137 std::vector<InstantAutocompleteResult> autocomplete_results_; |
139 size_t last_results_base_; | 138 size_t last_results_base_; |
140 std::vector<InstantAutocompleteResult> last_autocomplete_results_; | 139 std::vector<InstantAutocompleteResult> last_autocomplete_results_; |
141 bool is_key_capture_enabled_; | 140 bool is_key_capture_enabled_; |
142 ThemeBackgroundInfo theme_info_; | 141 ThemeBackgroundInfo theme_info_; |
143 bool display_instant_results_; | 142 bool display_instant_results_; |
144 string16 omnibox_font_; | 143 string16 omnibox_font_; |
145 size_t omnibox_font_size_; | 144 size_t omnibox_font_size_; |
146 std::vector<InstantMostVisitedItem> most_visited_items_; | 145 std::vector<InstantMostVisitedItem> most_visited_items_; |
147 | 146 |
148 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 147 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
149 }; | 148 }; |
150 | 149 |
151 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ | 150 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ |
OLD | NEW |