| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "components/contextual_suggestions/contextual_suggestions_service.h" |
| 12 #include "components/history/core/browser/keyword_id.h" | 13 #include "components/history/core/browser/keyword_id.h" |
| 13 #include "components/history/core/browser/top_sites.h" | 14 #include "components/history/core/browser/top_sites.h" |
| 14 #include "components/metrics/proto/omnibox_event.pb.h" | 15 #include "components/metrics/proto/omnibox_event.pb.h" |
| 15 #include "components/omnibox/browser/keyword_extensions_delegate.h" | 16 #include "components/omnibox/browser/keyword_extensions_delegate.h" |
| 16 #include "components/omnibox/browser/shortcuts_backend.h" | 17 #include "components/omnibox/browser/shortcuts_backend.h" |
| 17 | 18 |
| 18 class AutocompleteController; | 19 class AutocompleteController; |
| 19 struct AutocompleteMatch; | 20 struct AutocompleteMatch; |
| 20 class AutocompleteClassifier; | 21 class AutocompleteClassifier; |
| 21 class AutocompleteSchemeClassifier; | 22 class AutocompleteSchemeClassifier; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual PrefService* GetPrefs() = 0; | 54 virtual PrefService* GetPrefs() = 0; |
| 54 virtual const AutocompleteSchemeClassifier& GetSchemeClassifier() const = 0; | 55 virtual const AutocompleteSchemeClassifier& GetSchemeClassifier() const = 0; |
| 55 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; | 56 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; |
| 56 virtual history::HistoryService* GetHistoryService() = 0; | 57 virtual history::HistoryService* GetHistoryService() = 0; |
| 57 virtual scoped_refptr<history::TopSites> GetTopSites() = 0; | 58 virtual scoped_refptr<history::TopSites> GetTopSites() = 0; |
| 58 virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0; | 59 virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0; |
| 59 virtual history::URLDatabase* GetInMemoryDatabase() = 0; | 60 virtual history::URLDatabase* GetInMemoryDatabase() = 0; |
| 60 virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0; | 61 virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0; |
| 61 virtual TemplateURLService* GetTemplateURLService() = 0; | 62 virtual TemplateURLService* GetTemplateURLService() = 0; |
| 62 virtual const TemplateURLService* GetTemplateURLService() const = 0; | 63 virtual const TemplateURLService* GetTemplateURLService() const = 0; |
| 64 virtual contextual_suggestions::ContextualSuggestionsService* |
| 65 GetContextualSuggestionsService() const = 0; |
| 63 virtual const SearchTermsData& GetSearchTermsData() const = 0; | 66 virtual const SearchTermsData& GetSearchTermsData() const = 0; |
| 64 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0; | 67 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0; |
| 65 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0; | 68 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0; |
| 66 virtual std::unique_ptr<KeywordExtensionsDelegate> | 69 virtual std::unique_ptr<KeywordExtensionsDelegate> |
| 67 GetKeywordExtensionsDelegate(KeywordProvider* keyword_provider) = 0; | 70 GetKeywordExtensionsDelegate(KeywordProvider* keyword_provider) = 0; |
| 68 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; | 71 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; |
| 69 | 72 |
| 70 // The value to use for Accept-Languages HTTP header when making an HTTP | 73 // The value to use for Accept-Languages HTTP header when making an HTTP |
| 71 // request. | 74 // request. |
| 72 virtual std::string GetAcceptLanguages() const = 0; | 75 virtual std::string GetAcceptLanguages() const = 0; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // listeners add themselves to, and then kill this method. | 122 // listeners add themselves to, and then kill this method. |
| 120 virtual void OnAutocompleteControllerResultReady( | 123 virtual void OnAutocompleteControllerResultReady( |
| 121 AutocompleteController* controller) {} | 124 AutocompleteController* controller) {} |
| 122 | 125 |
| 123 // Called after creation of |keyword_provider| to allow the client to | 126 // Called after creation of |keyword_provider| to allow the client to |
| 124 // configure the provider if desired. | 127 // configure the provider if desired. |
| 125 virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {} | 128 virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {} |
| 126 }; | 129 }; |
| 127 | 130 |
| 128 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 131 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| OLD | NEW |