OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 TemplateURLModel to find the set of keywords. | 9 // KeywordProvider uses a TemplateURLModel to find the set of keywords. |
10 // | 10 // |
11 // For more information on the autocomplete system in general, including how | 11 // For more information on the autocomplete system in general, including how |
12 // the autocomplete controller and autocomplete providers work, see | 12 // the autocomplete controller and autocomplete providers work, see |
13 // chrome/browser/autocomplete.h. | 13 // chrome/browser/autocomplete.h. |
14 | 14 |
15 #ifndef CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ | 15 #ifndef CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ |
16 #define CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ | 16 #define CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ |
17 #pragma once | 17 #pragma once |
18 | 18 |
19 #include <string> | 19 #include <string> |
20 | 20 |
21 #include "chrome/browser/autocomplete/autocomplete.h" | 21 #include "chrome/browser/autocomplete/autocomplete.h" |
| 22 #include "chrome/common/notification_observer.h" |
22 #include "chrome/common/notification_registrar.h" | 23 #include "chrome/common/notification_registrar.h" |
23 | 24 |
24 class Profile; | 25 class Profile; |
25 class TemplateURL; | 26 class TemplateURL; |
26 class TemplateURLModel; | 27 class TemplateURLModel; |
27 | 28 |
28 // Autocomplete provider for keyword input. | 29 // Autocomplete provider for keyword input. |
29 // | 30 // |
30 // After construction, the autocomplete controller repeatedly calls Start() | 31 // After construction, the autocomplete controller repeatedly calls Start() |
31 // 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // If non-empty, holds the ID of the extension whose keyword is currently in | 147 // If non-empty, holds the ID of the extension whose keyword is currently in |
147 // the URL bar while the autocomplete popup is open. | 148 // the URL bar while the autocomplete popup is open. |
148 std::string current_keyword_extension_id_; | 149 std::string current_keyword_extension_id_; |
149 | 150 |
150 NotificationRegistrar registrar_; | 151 NotificationRegistrar registrar_; |
151 | 152 |
152 DISALLOW_COPY_AND_ASSIGN(KeywordProvider); | 153 DISALLOW_COPY_AND_ASSIGN(KeywordProvider); |
153 }; | 154 }; |
154 | 155 |
155 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ | 156 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_PROVIDER_H_ |
OLD | NEW |