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_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 Profile* profile() const; | 195 Profile* profile() const; |
196 | 196 |
197 // Returns whether input is in progress, i.e. if the omnibox has focus and the | 197 // Returns whether input is in progress, i.e. if the omnibox has focus and the |
198 // active tab is in mode SEARCH_SUGGESTIONS. | 198 // active tab is in mode SEARCH_SUGGESTIONS. |
199 bool IsInputInProgress() const; | 199 bool IsInputInProgress() const; |
200 | 200 |
201 // Returns the OmniboxView for |web_contents_| or NULL if not available. | 201 // Returns the OmniboxView for |web_contents_| or NULL if not available. |
202 OmniboxView* GetOmniboxView() const; | 202 OmniboxView* GetOmniboxView() const; |
203 | 203 |
204 // Record whether each suggestion comes from server or client. | |
205 void LogMostVisitedItemsSource( | |
206 const std::vector<InstantMostVisitedItem>& items); | |
207 | |
208 typedef bool (*OmniboxHasFocusFn)(OmniboxView*); | 204 typedef bool (*OmniboxHasFocusFn)(OmniboxView*); |
209 | 205 |
210 void set_omnibox_has_focus_fn(OmniboxHasFocusFn fn) { | 206 void set_omnibox_has_focus_fn(OmniboxHasFocusFn fn) { |
211 omnibox_has_focus_fn_ = fn; | 207 omnibox_has_focus_fn_ = fn; |
212 } | 208 } |
213 | 209 |
214 const bool is_search_enabled_; | 210 const bool is_search_enabled_; |
215 | 211 |
216 // Model object for UI that cares about search state. | 212 // Model object for UI that cares about search state. |
217 SearchModel model_; | 213 SearchModel model_; |
(...skipping 10 matching lines...) Expand all Loading... |
228 SearchTabHelperDelegate* delegate_; | 224 SearchTabHelperDelegate* delegate_; |
229 | 225 |
230 // Function to check if the omnibox has focus. Tests use this to modify the | 226 // Function to check if the omnibox has focus. Tests use this to modify the |
231 // default behavior. | 227 // default behavior. |
232 OmniboxHasFocusFn omnibox_has_focus_fn_; | 228 OmniboxHasFocusFn omnibox_has_focus_fn_; |
233 | 229 |
234 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 230 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
235 }; | 231 }; |
236 | 232 |
237 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 233 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
OLD | NEW |