OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
15 #include "components/omnibox/autocomplete_input.h" | 16 #include "components/omnibox/autocomplete_input.h" |
16 #include "components/omnibox/autocomplete_provider.h" | 17 #include "components/omnibox/autocomplete_provider.h" |
17 #include "components/omnibox/autocomplete_provider_listener.h" | 18 #include "components/omnibox/autocomplete_provider_listener.h" |
18 #include "components/omnibox/autocomplete_result.h" | 19 #include "components/omnibox/autocomplete_result.h" |
19 | 20 |
20 class AutocompleteControllerDelegate; | 21 class AutocompleteControllerDelegate; |
21 class HistoryURLProvider; | 22 class HistoryURLProvider; |
22 class KeywordProvider; | 23 class KeywordProvider; |
23 class Profile; | 24 class Profile; |
24 class SearchProvider; | 25 class SearchProvider; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Starts |stop_timer_|. | 199 // Starts |stop_timer_|. |
199 void StartStopTimer(); | 200 void StartStopTimer(); |
200 | 201 |
201 // Helper function for Stop(). |due_to_user_inactivity| means this call was | 202 // Helper function for Stop(). |due_to_user_inactivity| means this call was |
202 // triggered by a user's idleness, i.e., not an explicit user action. | 203 // triggered by a user's idleness, i.e., not an explicit user action. |
203 void StopHelper(bool clear_result, | 204 void StopHelper(bool clear_result, |
204 bool due_to_user_inactivity); | 205 bool due_to_user_inactivity); |
205 | 206 |
206 AutocompleteControllerDelegate* delegate_; | 207 AutocompleteControllerDelegate* delegate_; |
207 | 208 |
| 209 // The client passed to the providers. |
| 210 scoped_ptr<ChromeAutocompleteProviderClient> provider_client_; |
| 211 |
208 // A list of all providers. | 212 // A list of all providers. |
209 Providers providers_; | 213 Providers providers_; |
210 | 214 |
211 HistoryURLProvider* history_url_provider_; | 215 HistoryURLProvider* history_url_provider_; |
212 | 216 |
213 KeywordProvider* keyword_provider_; | 217 KeywordProvider* keyword_provider_; |
214 | 218 |
215 SearchProvider* search_provider_; | 219 SearchProvider* search_provider_; |
216 | 220 |
217 ZeroSuggestProvider* zero_suggest_provider_; | 221 ZeroSuggestProvider* zero_suggest_provider_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // Are we in Start()? This is used to avoid updating |result_| and sending | 258 // Are we in Start()? This is used to avoid updating |result_| and sending |
255 // notifications until Start() has been invoked on all providers. | 259 // notifications until Start() has been invoked on all providers. |
256 bool in_start_; | 260 bool in_start_; |
257 | 261 |
258 TemplateURLService* template_url_service_; | 262 TemplateURLService* template_url_service_; |
259 | 263 |
260 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); | 264 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); |
261 }; | 265 }; |
262 | 266 |
263 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ | 267 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ |
OLD | NEW |