blob: 6ac679289d308129de9021da5d086b5ddc16a73f [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
avie4d7b6f2015-12-26 00:59:188#include "base/macros.h"
hashimoto663b9f42014-08-26 04:29:209#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
blundell0c5bb2532015-06-16 14:23:1410#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
blundell2102f7c2015-07-09 10:00:5311#include "components/omnibox/browser/autocomplete_provider_client.h"
hashimoto663b9f42014-08-26 04:29:2012
13class Profile;
14
Ryo Hashimoto884ad192014-08-28 05:54:3015class ChromeAutocompleteProviderClient : public AutocompleteProviderClient {
hashimoto663b9f42014-08-26 04:29:2016 public:
Ryo Hashimoto884ad192014-08-28 05:54:3017 explicit ChromeAutocompleteProviderClient(Profile* profile);
Daniel Chenga542fca2014-10-21 09:51:2918 ~ChromeAutocompleteProviderClient() override;
hashimoto663b9f42014-08-26 04:29:2019
Ryo Hashimoto884ad192014-08-28 05:54:3020 // AutocompleteProviderClient:
paulmeyerb5824262015-06-17 18:08:4421 net::URLRequestContextGetter* GetRequestContext() override;
blundelld130d592015-06-21 19:29:1322 PrefService* GetPrefs() override;
23 const AutocompleteSchemeClassifier& GetSchemeClassifier() const override;
24 AutocompleteClassifier* GetAutocompleteClassifier() override;
paulmeyerb5824262015-06-17 18:08:4425 history::HistoryService* GetHistoryService() override;
blundelld130d592015-06-21 19:29:1326 scoped_refptr<history::TopSites> GetTopSites() override;
paulmeyerb5824262015-06-17 18:08:4427 bookmarks::BookmarkModel* GetBookmarkModel() override;
28 history::URLDatabase* GetInMemoryDatabase() override;
blundellb11c2787e2015-06-22 10:05:1029 InMemoryURLIndex* GetInMemoryURLIndex() override;
blundell0c5bb2532015-06-16 14:23:1430 TemplateURLService* GetTemplateURLService() override;
blundelld130d592015-06-21 19:29:1331 const TemplateURLService* GetTemplateURLService() const override;
32 const SearchTermsData& GetSearchTermsData() const override;
blundellfb1215ee2015-06-19 20:18:1233 scoped_refptr<ShortcutsBackend> GetShortcutsBackend() override;
34 scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() override;
dcheng4af48582016-04-19 00:29:3535 std::unique_ptr<KeywordExtensionsDelegate> GetKeywordExtensionsDelegate(
blundellb11c2787e2015-06-22 10:05:1036 KeywordProvider* keyword_provider) override;
vitaliiiee920542016-11-25 15:20:2337 physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() override;
blundelld130d592015-06-21 19:29:1338 std::string GetAcceptLanguages() const override;
blundellff1502c2015-06-22 11:34:3739 std::string GetEmbedderRepresentationOfAboutScheme() override;
40 std::vector<base::string16> GetBuiltinURLs() override;
41 std::vector<base::string16> GetBuiltinsToProvideAsUserTypes() override;
blundelld130d592015-06-21 19:29:1342 bool IsOffTheRecord() const override;
43 bool SearchSuggestEnabled() const override;
blundelld130d592015-06-21 19:29:1344 bool TabSyncEnabledAndUnencrypted() const override;
Daniel Chenga542fca2014-10-21 09:51:2945 void Classify(
hashimoto663b9f42014-08-26 04:29:2046 const base::string16& text,
47 bool prefer_keyword,
48 bool allow_exact_keyword_match,
49 metrics::OmniboxEventProto::PageClassification page_classification,
50 AutocompleteMatch* match,
mostynb01d8b10e2014-10-13 09:44:4451 GURL* alternate_nav_url) override;
Daniel Chenga542fca2014-10-21 09:51:2952 void DeleteMatchingURLsForKeywordFromHistory(
hashimoto663b9f42014-08-26 04:29:2053 history::KeywordID keyword_id,
mostynb01d8b10e2014-10-13 09:44:4454 const base::string16& term) override;
Daniel Chenga542fca2014-10-21 09:51:2955 void PrefetchImage(const GURL& url) override;
Justin Donnelly4e448cb2017-07-07 21:32:1356 void StartServiceWorker(const GURL& destination_url) override;
blundell62bf65f2015-06-19 08:30:4657 void OnAutocompleteControllerResultReady(
58 AutocompleteController* controller) override;
hashimoto663b9f42014-08-26 04:29:2059
60 private:
61 Profile* profile_;
62 ChromeAutocompleteSchemeClassifier scheme_classifier_;
blundell0c5bb2532015-06-16 14:23:1463 UIThreadSearchTermsData search_terms_data_;
hashimoto663b9f42014-08-26 04:29:2064
Ryo Hashimoto884ad192014-08-28 05:54:3065 DISALLOW_COPY_AND_ASSIGN(ChromeAutocompleteProviderClient);
hashimoto663b9f42014-08-26 04:29:2066};
67
Ryo Hashimoto884ad192014-08-28 05:54:3068#endif // CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_