| 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 and chrome://version. | 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 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 21 | 21 |
| 22 class BuiltinProvider : public AutocompleteProvider { | 22 class BuiltinProvider : public AutocompleteProvider { |
| 23 public: | 23 public: |
| 24 BuiltinProvider(ACProviderListener* listener, Profile* profile); | 24 BuiltinProvider(ACProviderListener* listener, Profile* profile); |
| 25 virtual ~BuiltinProvider(); | |
| 26 | 25 |
| 27 // AutocompleteProvider: | 26 // AutocompleteProvider: |
| 28 virtual void Start(const AutocompleteInput& input, | 27 virtual void Start(const AutocompleteInput& input, |
| 29 bool minimal_changes) OVERRIDE; | 28 bool minimal_changes) OVERRIDE; |
| 30 | 29 |
| 31 private: | 30 private: |
| 31 virtual ~BuiltinProvider(); |
| 32 |
| 32 typedef std::vector<string16> Builtins; | 33 typedef std::vector<string16> Builtins; |
| 33 | 34 |
| 34 static const int kRelevance; | 35 static const int kRelevance; |
| 35 | 36 |
| 36 void AddMatch(const string16& match_string, | 37 void AddMatch(const string16& match_string, |
| 37 const ACMatchClassifications& styles); | 38 const ACMatchClassifications& styles); |
| 38 | 39 |
| 39 Builtins builtins_; | 40 Builtins builtins_; |
| 40 | 41 |
| 41 DISALLOW_IMPLICIT_CONSTRUCTORS(BuiltinProvider); | 42 DISALLOW_IMPLICIT_CONSTRUCTORS(BuiltinProvider); |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 #endif // CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ | 45 #endif // CHROME_BROWSER_AUTOCOMPLETE_BUILTIN_PROVIDER_H_ |
| OLD | NEW |