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 COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
17 #include "components/omnibox/browser/autocomplete_input.h" | 17 #include "components/omnibox/browser/autocomplete_input.h" |
18 #include "components/omnibox/browser/autocomplete_provider.h" | 18 #include "components/omnibox/browser/autocomplete_provider.h" |
19 #include "components/omnibox/browser/autocomplete_provider_client.h" | 19 #include "components/omnibox/browser/autocomplete_provider_client.h" |
20 #include "components/omnibox/browser/autocomplete_provider_listener.h" | 20 #include "components/omnibox/browser/autocomplete_provider_listener.h" |
21 #include "components/omnibox/browser/autocomplete_result.h" | 21 #include "components/omnibox/browser/autocomplete_result.h" |
22 | 22 |
23 class AutocompleteControllerDelegate; | 23 class AutocompleteControllerDelegate; |
24 class ClipboardRecentContent; | |
25 class HistoryURLProvider; | 24 class HistoryURLProvider; |
26 class KeywordProvider; | 25 class KeywordProvider; |
27 class SearchProvider; | 26 class SearchProvider; |
28 class TemplateURLService; | 27 class TemplateURLService; |
29 class ZeroSuggestProvider; | 28 class ZeroSuggestProvider; |
30 | 29 |
31 // The AutocompleteController is the center of the autocomplete system. A | 30 // The AutocompleteController is the center of the autocomplete system. A |
32 // class creates an instance of the controller, which in turn creates a set of | 31 // class creates an instance of the controller, which in turn creates a set of |
33 // AutocompleteProviders to serve it. The owning class can ask the controller | 32 // AutocompleteProviders to serve it. The owning class can ask the controller |
34 // to Start() a query; the controller in turn passes this call down to the | 33 // to Start() a query; the controller in turn passes this call down to the |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 Providers providers_; | 201 Providers providers_; |
203 | 202 |
204 HistoryURLProvider* history_url_provider_; | 203 HistoryURLProvider* history_url_provider_; |
205 | 204 |
206 KeywordProvider* keyword_provider_; | 205 KeywordProvider* keyword_provider_; |
207 | 206 |
208 SearchProvider* search_provider_; | 207 SearchProvider* search_provider_; |
209 | 208 |
210 ZeroSuggestProvider* zero_suggest_provider_; | 209 ZeroSuggestProvider* zero_suggest_provider_; |
211 | 210 |
212 // Used to build the ClipboardURLProvider. | |
213 std::unique_ptr<ClipboardRecentContent> clipboard_recent_content_; | |
214 | |
215 // Input passed to Start. | 211 // Input passed to Start. |
216 AutocompleteInput input_; | 212 AutocompleteInput input_; |
217 | 213 |
218 // Data from the autocomplete query. | 214 // Data from the autocomplete query. |
219 AutocompleteResult result_; | 215 AutocompleteResult result_; |
220 | 216 |
221 // The most recent time the default match (inline match) changed. This may | 217 // The most recent time the default match (inline match) changed. This may |
222 // be earlier than the most recent keystroke if the recent keystrokes didn't | 218 // be earlier than the most recent keystroke if the recent keystrokes didn't |
223 // change the suggested match in the omnibox. (For instance, if | 219 // change the suggested match in the omnibox. (For instance, if |
224 // a user typed "mail.goog" and the match https://mail.google.com/ was | 220 // a user typed "mail.goog" and the match https://mail.google.com/ was |
(...skipping 25 matching lines...) Expand all Loading... |
250 // Are we in Start()? This is used to avoid updating |result_| and sending | 246 // Are we in Start()? This is used to avoid updating |result_| and sending |
251 // notifications until Start() has been invoked on all providers. | 247 // notifications until Start() has been invoked on all providers. |
252 bool in_start_; | 248 bool in_start_; |
253 | 249 |
254 TemplateURLService* template_url_service_; | 250 TemplateURLService* template_url_service_; |
255 | 251 |
256 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); | 252 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); |
257 }; | 253 }; |
258 | 254 |
259 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ | 255 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ |
OLD | NEW |