Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: components/omnibox/autocomplete_provider_client.h

Issue 1192373002: Prepare AutocompleteController for componentization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@componentize_zero_suggest_provider
Patch Set: Response to review Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/omnibox/BUILD.gn ('k') | components/omnibox/base_search_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/autocomplete_provider_client.h
diff --git a/components/omnibox/autocomplete_provider_client.h b/components/omnibox/autocomplete_provider_client.h
index 32dd416d74e27c44180041e16d553ac6f88cec80..8cbdbb34b8ae55539594f9290fa58deaccbbc1e8 100644
--- a/components/omnibox/autocomplete_provider_client.h
+++ b/components/omnibox/autocomplete_provider_client.h
@@ -10,6 +10,7 @@
#include "components/history/core/browser/keyword_id.h"
#include "components/history/core/browser/top_sites.h"
#include "components/metrics/proto/omnibox_event.pb.h"
+#include "components/omnibox/keyword_extensions_delegate.h"
#include "components/omnibox/shortcuts_backend.h"
class AutocompleteController;
@@ -17,6 +18,8 @@ struct AutocompleteMatch;
class AutocompleteClassifier;
class AutocompleteSchemeClassifier;
class GURL;
+class InMemoryURLIndex;
+class KeywordProvider;
class PrefService;
class ShortcutsBackend;
@@ -48,11 +51,14 @@ class AutocompleteProviderClient {
virtual scoped_refptr<history::TopSites> GetTopSites() = 0;
virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0;
virtual history::URLDatabase* GetInMemoryDatabase() = 0;
+ virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0;
virtual TemplateURLService* GetTemplateURLService() = 0;
virtual const TemplateURLService* GetTemplateURLService() const = 0;
virtual const SearchTermsData& GetSearchTermsData() const = 0;
virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0;
virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0;
+ virtual scoped_ptr<KeywordExtensionsDelegate> GetKeywordExtensionsDelegate(
+ KeywordProvider* keyword_provider) = 0;
// The value to use for Accept-Languages HTTP header when making an HTTP
// request.
@@ -93,6 +99,10 @@ class AutocompleteProviderClient {
// listeners add themselves to, and then kill this method.
virtual void OnAutocompleteControllerResultReady(
AutocompleteController* controller) {}
+
+ // Called after creation of |keyword_provider| to allow the client to
+ // configure the provider if desired.
+ virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {}
};
#endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_
« no previous file with comments | « components/omnibox/BUILD.gn ('k') | components/omnibox/base_search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698