OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 autocomplete provider for built-in URLs, | 5 // This file contains the autocomplete provider for built-in URLs, |
6 // such as about:settings. | 6 // such as about:settings and chrome://version. |
7 // | 7 // |
8 // For more information on the autocomplete system in general, including how | 8 // For more information on the autocomplete system in general, including how |
9 // the autocomplete controller and autocomplete providers work, see | 9 // the autocomplete controller and autocomplete providers work, see |
10 // chrome/browser/autocomplete.h. | 10 // chrome/browser/autocomplete.h. |
11 | 11 |
12 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ | 12 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ |
13 #define CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ | 13 #define CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ |
14 #pragma once | 14 #pragma once |
15 | 15 |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/string16.h" | 18 #include "base/string16.h" |
19 #include "chrome/browser/autocomplete/autocomplete.h" | 19 #include "chrome/browser/autocomplete/autocomplete.h" |
| 20 #include "chrome/browser/autocomplete/autocomplete_match.h" |
20 | 21 |
21 class BuiltinProvider : public AutocompleteProvider { | 22 class BuiltinProvider : public AutocompleteProvider { |
22 public: | 23 public: |
23 BuiltinProvider(ACProviderListener* listener, Profile* profile); | 24 BuiltinProvider(ACProviderListener* listener, Profile* profile); |
24 virtual ~BuiltinProvider(); | 25 virtual ~BuiltinProvider(); |
25 | 26 |
26 // AutocompleteProvider: | 27 // AutocompleteProvider: |
27 virtual void Start(const AutocompleteInput& input, bool minimal_changes); | 28 virtual void Start(const AutocompleteInput& input, bool minimal_changes); |
28 | 29 |
29 private: | 30 private: |
| 31 typedef std::vector<string16> Builtins; |
| 32 |
30 static const int kRelevance; | 33 static const int kRelevance; |
31 | 34 |
32 typedef std::vector<string16> Builtins; | 35 void AddMatch(const string16& match_string, |
| 36 const ACMatchClassifications& styles); |
33 | 37 |
34 Builtins builtins_; | 38 Builtins builtins_; |
35 | 39 |
36 DISALLOW_IMPLICIT_CONSTRUCTORS(BuiltinProvider); | 40 DISALLOW_IMPLICIT_CONSTRUCTORS(BuiltinProvider); |
37 }; | 41 }; |
38 | 42 |
39 #endif // CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ | 43 #endif // CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ |
OLD | NEW |