blob: 460af9f8c3d6906d909275c19dcf21778ee193a1 [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"
Ryo Hashimoto884ad192014-08-28 05:54:3010#include "components/omnibox/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:
Daniel Chenga542fca2014-10-21 09:51:2920 net::URLRequestContextGetter* RequestContext() override;
Daniel Chenga542fca2014-10-21 09:51:2921 const AutocompleteSchemeClassifier& SchemeClassifier() override;
blundell55e35e82015-06-16 08:46:1822 history::HistoryService* HistoryService() override;
23 bookmarks::BookmarkModel* BookmarkModel() override;
blundell27855972015-06-16 12:37:5424 history::URLDatabase* InMemoryDatabase() override;
blundell0c5bb2532015-06-16 14:23:1425 TemplateURLService* GetTemplateURLService() override;
26 const SearchTermsData& GetSearchTermsData() override;
blundell27855972015-06-16 12:37:5427 std::string AcceptLanguages() override;
28 bool IsOffTheRecord() override;
29 bool SearchSuggestEnabled() override;
30 bool ShowBookmarkBar() override;
31 bool TabSyncEnabledAndUnencrypted() override;
Daniel Chenga542fca2014-10-21 09:51:2932 void Classify(
hashimoto663b9f42014-08-26 04:29:2033 const base::string16& text,
34 bool prefer_keyword,
35 bool allow_exact_keyword_match,
36 metrics::OmniboxEventProto::PageClassification page_classification,
37 AutocompleteMatch* match,
mostynb01d8b10e2014-10-13 09:44:4438 GURL* alternate_nav_url) override;
Daniel Chenga542fca2014-10-21 09:51:2939 void DeleteMatchingURLsForKeywordFromHistory(
hashimoto663b9f42014-08-26 04:29:2040 history::KeywordID keyword_id,
mostynb01d8b10e2014-10-13 09:44:4441 const base::string16& term) override;
Daniel Chenga542fca2014-10-21 09:51:2942 void PrefetchImage(const GURL& url) override;
hashimoto663b9f42014-08-26 04:29:2043
44 private:
45 Profile* profile_;
46 ChromeAutocompleteSchemeClassifier scheme_classifier_;
blundell0c5bb2532015-06-16 14:23:1447 UIThreadSearchTermsData search_terms_data_;
hashimoto663b9f42014-08-26 04:29:2048
Ryo Hashimoto884ad192014-08-28 05:54:3049 DISALLOW_COPY_AND_ASSIGN(ChromeAutocompleteProviderClient);
hashimoto663b9f42014-08-26 04:29:2050};
51
Ryo Hashimoto884ad192014-08-28 05:54:3052#endif // CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_