Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: components/omnibox/browser/autocomplete_provider_client.h

Issue 2528893003: [PhysicalWeb] Add physical_web namespace. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "components/history/core/browser/keyword_id.h" 12 #include "components/history/core/browser/keyword_id.h"
13 #include "components/history/core/browser/top_sites.h" 13 #include "components/history/core/browser/top_sites.h"
14 #include "components/metrics/proto/omnibox_event.pb.h" 14 #include "components/metrics/proto/omnibox_event.pb.h"
15 #include "components/omnibox/browser/keyword_extensions_delegate.h" 15 #include "components/omnibox/browser/keyword_extensions_delegate.h"
16 #include "components/omnibox/browser/shortcuts_backend.h" 16 #include "components/omnibox/browser/shortcuts_backend.h"
17 17
18 class AutocompleteController; 18 class AutocompleteController;
19 struct AutocompleteMatch; 19 struct AutocompleteMatch;
20 class AutocompleteClassifier; 20 class AutocompleteClassifier;
21 class AutocompleteSchemeClassifier; 21 class AutocompleteSchemeClassifier;
22 class GURL; 22 class GURL;
23 class InMemoryURLIndex; 23 class InMemoryURLIndex;
24 class KeywordProvider; 24 class KeywordProvider;
25 class PhysicalWebDataSource;
26 class PrefService; 25 class PrefService;
27 class ShortcutsBackend; 26 class ShortcutsBackend;
28 27
29 namespace bookmarks { 28 namespace bookmarks {
30 class BookmarkModel; 29 class BookmarkModel;
31 } 30 }
32 31
33 namespace history { 32 namespace history {
34 class HistoryService; 33 class HistoryService;
35 class URLDatabase; 34 class URLDatabase;
36 } 35 }
37 36
38 namespace net { 37 namespace net {
39 class URLRequestContextGetter; 38 class URLRequestContextGetter;
40 } 39 }
41 40
41 namespace physical_web {
42 class PhysicalWebDataSource;
43 }
44
42 class SearchTermsData; 45 class SearchTermsData;
43 class TemplateURLService; 46 class TemplateURLService;
44 47
45 class AutocompleteProviderClient { 48 class AutocompleteProviderClient {
46 public: 49 public:
47 virtual ~AutocompleteProviderClient() {} 50 virtual ~AutocompleteProviderClient() {}
48 51
49 virtual net::URLRequestContextGetter* GetRequestContext() = 0; 52 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
50 virtual PrefService* GetPrefs() = 0; 53 virtual PrefService* GetPrefs() = 0;
51 virtual const AutocompleteSchemeClassifier& GetSchemeClassifier() const = 0; 54 virtual const AutocompleteSchemeClassifier& GetSchemeClassifier() const = 0;
52 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; 55 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0;
53 virtual history::HistoryService* GetHistoryService() = 0; 56 virtual history::HistoryService* GetHistoryService() = 0;
54 virtual scoped_refptr<history::TopSites> GetTopSites() = 0; 57 virtual scoped_refptr<history::TopSites> GetTopSites() = 0;
55 virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0; 58 virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0;
56 virtual history::URLDatabase* GetInMemoryDatabase() = 0; 59 virtual history::URLDatabase* GetInMemoryDatabase() = 0;
57 virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0; 60 virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0;
58 virtual TemplateURLService* GetTemplateURLService() = 0; 61 virtual TemplateURLService* GetTemplateURLService() = 0;
59 virtual const TemplateURLService* GetTemplateURLService() const = 0; 62 virtual const TemplateURLService* GetTemplateURLService() const = 0;
60 virtual const SearchTermsData& GetSearchTermsData() const = 0; 63 virtual const SearchTermsData& GetSearchTermsData() const = 0;
61 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0; 64 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0;
62 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0; 65 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0;
63 virtual std::unique_ptr<KeywordExtensionsDelegate> 66 virtual std::unique_ptr<KeywordExtensionsDelegate>
64 GetKeywordExtensionsDelegate(KeywordProvider* keyword_provider) = 0; 67 GetKeywordExtensionsDelegate(KeywordProvider* keyword_provider) = 0;
65 virtual PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; 68 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0;
66 69
67 // The value to use for Accept-Languages HTTP header when making an HTTP 70 // The value to use for Accept-Languages HTTP header when making an HTTP
68 // request. 71 // request.
69 virtual std::string GetAcceptLanguages() const = 0; 72 virtual std::string GetAcceptLanguages() const = 0;
70 73
71 // The embedder's representation of the |about| URL scheme for builtin URLs 74 // The embedder's representation of the |about| URL scheme for builtin URLs
72 // (e.g., |chrome| for Chrome). 75 // (e.g., |chrome| for Chrome).
73 virtual std::string GetEmbedderRepresentationOfAboutScheme() = 0; 76 virtual std::string GetEmbedderRepresentationOfAboutScheme() = 0;
74 77
75 // The set of built-in URLs considered worth suggesting as autocomplete 78 // The set of built-in URLs considered worth suggesting as autocomplete
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // listeners add themselves to, and then kill this method. 119 // listeners add themselves to, and then kill this method.
117 virtual void OnAutocompleteControllerResultReady( 120 virtual void OnAutocompleteControllerResultReady(
118 AutocompleteController* controller) {} 121 AutocompleteController* controller) {}
119 122
120 // Called after creation of |keyword_provider| to allow the client to 123 // Called after creation of |keyword_provider| to allow the client to
121 // configure the provider if desired. 124 // configure the provider if desired.
122 virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {} 125 virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {}
123 }; 126 };
124 127
125 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ 128 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698