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 COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_DELEGATE_H_ | 5 #ifndef COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_DELEGATE_H_ | 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "components/history/core/browser/keyword_id.h" | 9 #include "components/history/core/browser/keyword_id.h" |
10 #include "components/metrics/proto/omnibox_event.pb.h" | 10 #include "components/metrics/proto/omnibox_event.pb.h" |
11 | 11 |
12 struct AutocompleteMatch; | 12 struct AutocompleteMatch; |
13 class AutocompleteSchemeClassifier; | 13 class AutocompleteSchemeClassifier; |
14 class GURL; | 14 class GURL; |
15 | 15 |
16 namespace history { | 16 namespace history { |
17 class URLDatabase; | 17 class URLDatabase; |
18 } | 18 } |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 class URLRequestContextGetter; | 21 class URLRequestContextGetter; |
22 } | 22 } |
23 | 23 |
24 class AutocompleteProviderDelegate { | 24 class AutocompleteProviderClient { |
25 public: | 25 public: |
26 virtual ~AutocompleteProviderDelegate() {} | 26 virtual ~AutocompleteProviderClient() {} |
27 | 27 |
28 // Returns the request context. | 28 // Returns the request context. |
29 virtual net::URLRequestContextGetter* RequestContext() = 0; | 29 virtual net::URLRequestContextGetter* RequestContext() = 0; |
30 | 30 |
31 // Returns whether the provider should work in incognito mode. | 31 // Returns whether the provider should work in incognito mode. |
32 virtual bool IsOffTheRecord() = 0; | 32 virtual bool IsOffTheRecord() = 0; |
33 | 33 |
34 // The value to use for Accept-Languages HTTP header when making an HTTP | 34 // The value to use for Accept-Languages HTTP header when making an HTTP |
35 // request. | 35 // request. |
36 virtual std::string AcceptLanguages() = 0; | 36 virtual std::string AcceptLanguages() = 0; |
(...skipping 26 matching lines...) Expand all Loading... |
63 history::KeywordID keyword_id, | 63 history::KeywordID keyword_id, |
64 const base::string16& term) = 0; | 64 const base::string16& term) = 0; |
65 | 65 |
66 // Returns whether the user has tab sync enabled and tab sync is unencrypted. | 66 // Returns whether the user has tab sync enabled and tab sync is unencrypted. |
67 virtual bool TabSyncEnabledAndUnencrypted() = 0; | 67 virtual bool TabSyncEnabledAndUnencrypted() = 0; |
68 | 68 |
69 // Starts prefetching the image at the given |url|. | 69 // Starts prefetching the image at the given |url|. |
70 virtual void PrefetchImage(const GURL& url) = 0; | 70 virtual void PrefetchImage(const GURL& url) = 0; |
71 }; | 71 }; |
72 | 72 |
73 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_DELEGATE_H_ | 73 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
OLD | NEW |