blob: e8b218a5a3013e2746562bd66819e2a6226fa102 [file] [log] [blame]
hashimoto663b9f42014-08-26 04:29:201// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ryo Hashimoto884ad192014-08-28 05:54:305#ifndef CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_
6#define CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_
hashimoto663b9f42014-08-26 04:29:207
8#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
blundell0c5bb2532015-06-16 14:23:149#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
blundell2102f7c2015-07-09 10:00:5310#include "components/omnibox/browser/autocomplete_provider_client.h"
hashimoto663b9f42014-08-26 04:29:2011
12class Profile;
13
Ryo Hashimoto884ad192014-08-28 05:54:3014class ChromeAutocompleteProviderClient : public AutocompleteProviderClient {
hashimoto663b9f42014-08-26 04:29:2015 public:
Ryo Hashimoto884ad192014-08-28 05:54:3016 explicit ChromeAutocompleteProviderClient(Profile* profile);
Daniel Chenga542fca2014-10-21 09:51:2917 ~ChromeAutocompleteProviderClient() override;
hashimoto663b9f42014-08-26 04:29:2018
Ryo Hashimoto884ad192014-08-28 05:54:3019 // AutocompleteProviderClient:
paulmeyerb5824262015-06-17 18:08:4420 net::URLRequestContextGetter* GetRequestContext() override;
blundelld130d592015-06-21 19:29:1321 PrefService* GetPrefs() override;
22 const AutocompleteSchemeClassifier& GetSchemeClassifier() const override;
23 AutocompleteClassifier* GetAutocompleteClassifier() override;
paulmeyerb5824262015-06-17 18:08:4424 history::HistoryService* GetHistoryService() override;
blundelld130d592015-06-21 19:29:1325 scoped_refptr<history::TopSites> GetTopSites() override;
paulmeyerb5824262015-06-17 18:08:4426 bookmarks::BookmarkModel* GetBookmarkModel() override;
27 history::URLDatabase* GetInMemoryDatabase() override;
blundellb11c2787e2015-06-22 10:05:1028 InMemoryURLIndex* GetInMemoryURLIndex() override;
blundell0c5bb2532015-06-16 14:23:1429 TemplateURLService* GetTemplateURLService() override;
blundelld130d592015-06-21 19:29:1330 const TemplateURLService* GetTemplateURLService() const override;
31 const SearchTermsData& GetSearchTermsData() const override;
blundellfb1215ee2015-06-19 20:18:1232 scoped_refptr<ShortcutsBackend> GetShortcutsBackend() override;
33 scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() override;
blundellb11c2787e2015-06-22 10:05:1034 scoped_ptr<KeywordExtensionsDelegate> GetKeywordExtensionsDelegate(
35 KeywordProvider* keyword_provider) override;
blundelld130d592015-06-21 19:29:1336 std::string GetAcceptLanguages() const override;
blundellff1502c2015-06-22 11:34:3737 std::string GetEmbedderRepresentationOfAboutScheme() override;
38 std::vector<base::string16> GetBuiltinURLs() override;
39 std::vector<base::string16> GetBuiltinsToProvideAsUserTypes() override;
blundelld130d592015-06-21 19:29:1340 bool IsOffTheRecord() const override;
41 bool SearchSuggestEnabled() const override;
42 bool BookmarkBarIsVisible() const override;
43 bool TabSyncEnabledAndUnencrypted() const override;
Daniel Chenga542fca2014-10-21 09:51:2944 void Classify(
hashimoto663b9f42014-08-26 04:29:2045 const base::string16& text,
46 bool prefer_keyword,
47 bool allow_exact_keyword_match,
48 metrics::OmniboxEventProto::PageClassification page_classification,
49 AutocompleteMatch* match,
mostynb01d8b10e2014-10-13 09:44:4450 GURL* alternate_nav_url) override;
Daniel Chenga542fca2014-10-21 09:51:2951 void DeleteMatchingURLsForKeywordFromHistory(
hashimoto663b9f42014-08-26 04:29:2052 history::KeywordID keyword_id,
mostynb01d8b10e2014-10-13 09:44:4453 const base::string16& term) override;
Daniel Chenga542fca2014-10-21 09:51:2954 void PrefetchImage(const GURL& url) override;
blundell62bf65f2015-06-19 08:30:4655 void OnAutocompleteControllerResultReady(
56 AutocompleteController* controller) override;
hashimoto663b9f42014-08-26 04:29:2057
58 private:
59 Profile* profile_;
60 ChromeAutocompleteSchemeClassifier scheme_classifier_;
blundell0c5bb2532015-06-16 14:23:1461 UIThreadSearchTermsData search_terms_data_;
hashimoto663b9f42014-08-26 04:29:2062
Ryo Hashimoto884ad192014-08-28 05:54:3063 DISALLOW_COPY_AND_ASSIGN(ChromeAutocompleteProviderClient);
hashimoto663b9f42014-08-26 04:29:2064};
65
Ryo Hashimoto884ad192014-08-28 05:54:3066#endif // CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_