| 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 CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 8 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
| 9 #include "components/omnibox/autocomplete_provider_client.h" | 9 #include "components/omnibox/autocomplete_provider_client.h" |
| 10 | 10 |
| 11 class Profile; | 11 class Profile; |
| 12 | 12 |
| 13 class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { | 13 class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { |
| 14 public: | 14 public: |
| 15 explicit ChromeAutocompleteProviderClient(Profile* profile); | 15 explicit ChromeAutocompleteProviderClient(Profile* profile); |
| 16 ~ChromeAutocompleteProviderClient() override; | 16 ~ChromeAutocompleteProviderClient() override; |
| 17 | 17 |
| 18 // AutocompleteProviderClient: | 18 // AutocompleteProviderClient: |
| 19 net::URLRequestContextGetter* RequestContext() override; | 19 net::URLRequestContextGetter* RequestContext() override; |
| 20 bool IsOffTheRecord() override; | 20 bool IsOffTheRecord() override; |
| 21 std::string AcceptLanguages() override; | 21 std::string AcceptLanguages() override; |
| 22 bool SearchSuggestEnabled() override; | 22 bool SearchSuggestEnabled() override; |
| 23 bool ShowBookmarkBar() override; | 23 bool ShowBookmarkBar() override; |
| 24 const AutocompleteSchemeClassifier& SchemeClassifier() override; | 24 const AutocompleteSchemeClassifier& SchemeClassifier() override; |
| 25 history::HistoryService* HistoryService() override; |
| 26 bookmarks::BookmarkModel* BookmarkModel() override; |
| 25 void Classify( | 27 void Classify( |
| 26 const base::string16& text, | 28 const base::string16& text, |
| 27 bool prefer_keyword, | 29 bool prefer_keyword, |
| 28 bool allow_exact_keyword_match, | 30 bool allow_exact_keyword_match, |
| 29 metrics::OmniboxEventProto::PageClassification page_classification, | 31 metrics::OmniboxEventProto::PageClassification page_classification, |
| 30 AutocompleteMatch* match, | 32 AutocompleteMatch* match, |
| 31 GURL* alternate_nav_url) override; | 33 GURL* alternate_nav_url) override; |
| 32 history::URLDatabase* InMemoryDatabase() override; | 34 history::URLDatabase* InMemoryDatabase() override; |
| 33 void DeleteMatchingURLsForKeywordFromHistory( | 35 void DeleteMatchingURLsForKeywordFromHistory( |
| 34 history::KeywordID keyword_id, | 36 history::KeywordID keyword_id, |
| 35 const base::string16& term) override; | 37 const base::string16& term) override; |
| 36 bool TabSyncEnabledAndUnencrypted() override; | 38 bool TabSyncEnabledAndUnencrypted() override; |
| 37 void PrefetchImage(const GURL& url) override; | 39 void PrefetchImage(const GURL& url) override; |
| 38 | 40 |
| 39 private: | 41 private: |
| 40 Profile* profile_; | 42 Profile* profile_; |
| 41 ChromeAutocompleteSchemeClassifier scheme_classifier_; | 43 ChromeAutocompleteSchemeClassifier scheme_classifier_; |
| 42 | 44 |
| 43 DISALLOW_COPY_AND_ASSIGN(ChromeAutocompleteProviderClient); | 45 DISALLOW_COPY_AND_ASSIGN(ChromeAutocompleteProviderClient); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 #endif // CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 48 #endif // CHROME_BROWSER_AUTOCOMPLETE_CHROME_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| OLD | NEW |