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 CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 23 matching lines...) Expand all Loading... |
34 // performed |minimal_changes| is ignored. | 34 // performed |minimal_changes| is ignored. |
35 virtual void Start(const AutocompleteInput& input, | 35 virtual void Start(const AutocompleteInput& input, |
36 bool minimal_changes) OVERRIDE; | 36 bool minimal_changes) OVERRIDE; |
37 | 37 |
38 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE; | 38 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE; |
39 | 39 |
40 private: | 40 private: |
41 friend class ClassifyTest; | 41 friend class ClassifyTest; |
42 friend class history::ShortcutsProviderTest; | 42 friend class history::ShortcutsProviderTest; |
43 | 43 |
44 typedef std::multimap<char16, base::string16> WordMap; | 44 typedef std::multimap<base::char16, base::string16> WordMap; |
45 | 45 |
46 virtual ~ShortcutsProvider(); | 46 virtual ~ShortcutsProvider(); |
47 | 47 |
48 // ShortcutsBackendObserver: | 48 // ShortcutsBackendObserver: |
49 virtual void OnShortcutsLoaded() OVERRIDE; | 49 virtual void OnShortcutsLoaded() OVERRIDE; |
50 | 50 |
51 // Performs the autocomplete matching and scoring. | 51 // Performs the autocomplete matching and scoring. |
52 void GetMatches(const AutocompleteInput& input); | 52 void GetMatches(const AutocompleteInput& input); |
53 | 53 |
54 // Returns an AutocompleteMatch corresponding to |shortcut|. Assigns it | 54 // Returns an AutocompleteMatch corresponding to |shortcut|. Assigns it |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int CalculateScore( | 105 int CalculateScore( |
106 const base::string16& terms, | 106 const base::string16& terms, |
107 const history::ShortcutsBackend::Shortcut& shortcut, | 107 const history::ShortcutsBackend::Shortcut& shortcut, |
108 int max_relevance); | 108 int max_relevance); |
109 | 109 |
110 std::string languages_; | 110 std::string languages_; |
111 bool initialized_; | 111 bool initialized_; |
112 }; | 112 }; |
113 | 113 |
114 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ | 114 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ |
OLD | NEW |