| 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 COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ |
| 6 #define COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 explicit ShortcutsProvider(AutocompleteProviderClient* client); | 26 explicit ShortcutsProvider(AutocompleteProviderClient* client); |
| 27 | 27 |
| 28 // Performs the autocompletion synchronously. Since no asynch completion is | 28 // Performs the autocompletion synchronously. Since no asynch completion is |
| 29 // performed |minimal_changes| is ignored. | 29 // performed |minimal_changes| is ignored. |
| 30 void Start(const AutocompleteInput& input, bool minimal_changes) override; | 30 void Start(const AutocompleteInput& input, bool minimal_changes) override; |
| 31 | 31 |
| 32 void DeleteMatch(const AutocompleteMatch& match) override; | 32 void DeleteMatch(const AutocompleteMatch& match) override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 friend class ClassifyTest; | 35 friend class ClassifyTest; |
| 36 friend class ShortcutsProviderExtensionTest; |
| 36 friend class ShortcutsProviderTest; | 37 friend class ShortcutsProviderTest; |
| 37 FRIEND_TEST_ALL_PREFIXES(ShortcutsProviderTest, CalculateScore); | 38 FRIEND_TEST_ALL_PREFIXES(ShortcutsProviderTest, CalculateScore); |
| 38 | 39 |
| 39 typedef std::multimap<base::char16, base::string16> WordMap; | 40 typedef std::multimap<base::char16, base::string16> WordMap; |
| 40 | 41 |
| 41 ~ShortcutsProvider() override; | 42 ~ShortcutsProvider() override; |
| 42 | 43 |
| 43 // ShortcutsBackendObserver: | 44 // ShortcutsBackendObserver: |
| 44 void OnShortcutsLoaded() override; | 45 void OnShortcutsLoaded() override; |
| 45 | 46 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 102 |
| 102 // The default max relevance unless overridden by a field trial. | 103 // The default max relevance unless overridden by a field trial. |
| 103 static const int kShortcutsProviderDefaultMaxRelevance; | 104 static const int kShortcutsProviderDefaultMaxRelevance; |
| 104 | 105 |
| 105 AutocompleteProviderClient* client_; | 106 AutocompleteProviderClient* client_; |
| 106 std::string languages_; | 107 std::string languages_; |
| 107 bool initialized_; | 108 bool initialized_; |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 #endif // COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ | 111 #endif // COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_PROVIDER_H_ |
| OLD | NEW |