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 // This file contains the keyword autocomplete provider. The keyword provider | 5 // This file contains the keyword autocomplete provider. The keyword provider |
6 // is responsible for remembering/suggesting user "search keyword queries" | 6 // is responsible for remembering/suggesting user "search keyword queries" |
7 // (e.g. "imdb Godzilla") and then fixing them up into valid URLs. An | 7 // (e.g. "imdb Godzilla") and then fixing them up into valid URLs. An |
8 // instance of it gets created and managed by the autocomplete controller. | 8 // instance of it gets created and managed by the autocomplete controller. |
9 // KeywordProvider uses a TemplateURLService to find the set of keywords. | 9 // KeywordProvider uses a TemplateURLService to find the set of keywords. |
10 | 10 |
11 #ifndef CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ | 11 #ifndef COMPONENTS_OMNIBOX_KEYWORD_PROVIDER_H_ |
12 #define CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ | 12 #define COMPONENTS_OMNIBOX_KEYWORD_PROVIDER_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "chrome/browser/autocomplete/keyword_extensions_delegate.h" | |
20 #include "components/metrics/proto/omnibox_input_type.pb.h" | 19 #include "components/metrics/proto/omnibox_input_type.pb.h" |
21 #include "components/omnibox/autocomplete_input.h" | 20 #include "components/omnibox/autocomplete_input.h" |
22 #include "components/omnibox/autocomplete_provider.h" | 21 #include "components/omnibox/autocomplete_provider.h" |
| 22 #include "components/omnibox/keyword_extensions_delegate.h" |
23 | 23 |
24 class AutocompleteProviderListener; | 24 class AutocompleteProviderListener; |
25 class KeywordExtensionsDelegate; | 25 class KeywordExtensionsDelegate; |
26 class TemplateURL; | 26 class TemplateURL; |
27 class TemplateURLService; | 27 class TemplateURLService; |
28 | 28 |
29 // Autocomplete provider for keyword input. | 29 // Autocomplete provider for keyword input. |
30 // | 30 // |
31 // After construction, the autocomplete controller repeatedly calls Start() | 31 // After construction, the autocomplete controller repeatedly calls Start() |
32 // with some user input, each time expecting to receive a small set of the best | 32 // with some user input, each time expecting to receive a small set of the best |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // Model for the keywords. | 148 // Model for the keywords. |
149 TemplateURLService* model_; | 149 TemplateURLService* model_; |
150 | 150 |
151 // Delegate to handle the extensions-only logic for KeywordProvider. | 151 // Delegate to handle the extensions-only logic for KeywordProvider. |
152 // NULL when extensions are not enabled. May be NULL for tests. | 152 // NULL when extensions are not enabled. May be NULL for tests. |
153 scoped_ptr<KeywordExtensionsDelegate> extensions_delegate_; | 153 scoped_ptr<KeywordExtensionsDelegate> extensions_delegate_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(KeywordProvider); | 155 DISALLOW_COPY_AND_ASSIGN(KeywordProvider); |
156 }; | 156 }; |
157 | 157 |
158 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ | 158 #endif // COMPONENTS_OMNIBOX_KEYWORD_PROVIDER_H_ |
OLD | NEW |