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