| 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_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; |
| 25 class PrefService; | 26 class PrefService; |
| 26 class ShortcutsBackend; | 27 class ShortcutsBackend; |
| 27 | 28 |
| 28 namespace bookmarks { | 29 namespace bookmarks { |
| 29 class BookmarkModel; | 30 class BookmarkModel; |
| 30 } | 31 } |
| 31 | 32 |
| 32 namespace history { | 33 namespace history { |
| 33 class HistoryService; | 34 class HistoryService; |
| 34 class URLDatabase; | 35 class URLDatabase; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 54 virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0; | 55 virtual bookmarks::BookmarkModel* GetBookmarkModel() = 0; |
| 55 virtual history::URLDatabase* GetInMemoryDatabase() = 0; | 56 virtual history::URLDatabase* GetInMemoryDatabase() = 0; |
| 56 virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0; | 57 virtual InMemoryURLIndex* GetInMemoryURLIndex() = 0; |
| 57 virtual TemplateURLService* GetTemplateURLService() = 0; | 58 virtual TemplateURLService* GetTemplateURLService() = 0; |
| 58 virtual const TemplateURLService* GetTemplateURLService() const = 0; | 59 virtual const TemplateURLService* GetTemplateURLService() const = 0; |
| 59 virtual const SearchTermsData& GetSearchTermsData() const = 0; | 60 virtual const SearchTermsData& GetSearchTermsData() const = 0; |
| 60 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0; | 61 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackend() = 0; |
| 61 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0; | 62 virtual scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() = 0; |
| 62 virtual std::unique_ptr<KeywordExtensionsDelegate> | 63 virtual std::unique_ptr<KeywordExtensionsDelegate> |
| 63 GetKeywordExtensionsDelegate(KeywordProvider* keyword_provider) = 0; | 64 GetKeywordExtensionsDelegate(KeywordProvider* keyword_provider) = 0; |
| 65 virtual PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; |
| 64 | 66 |
| 65 // The value to use for Accept-Languages HTTP header when making an HTTP | 67 // The value to use for Accept-Languages HTTP header when making an HTTP |
| 66 // request. | 68 // request. |
| 67 virtual std::string GetAcceptLanguages() const = 0; | 69 virtual std::string GetAcceptLanguages() const = 0; |
| 68 | 70 |
| 69 // The embedder's representation of the |about| URL scheme for builtin URLs | 71 // The embedder's representation of the |about| URL scheme for builtin URLs |
| 70 // (e.g., |chrome| for Chrome). | 72 // (e.g., |chrome| for Chrome). |
| 71 virtual std::string GetEmbedderRepresentationOfAboutScheme() = 0; | 73 virtual std::string GetEmbedderRepresentationOfAboutScheme() = 0; |
| 72 | 74 |
| 73 // The set of built-in URLs considered worth suggesting as autocomplete | 75 // The set of built-in URLs considered worth suggesting as autocomplete |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // listeners add themselves to, and then kill this method. | 116 // listeners add themselves to, and then kill this method. |
| 115 virtual void OnAutocompleteControllerResultReady( | 117 virtual void OnAutocompleteControllerResultReady( |
| 116 AutocompleteController* controller) {} | 118 AutocompleteController* controller) {} |
| 117 | 119 |
| 118 // Called after creation of |keyword_provider| to allow the client to | 120 // Called after creation of |keyword_provider| to allow the client to |
| 119 // configure the provider if desired. | 121 // configure the provider if desired. |
| 120 virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {} | 122 virtual void ConfigureKeywordProvider(KeywordProvider* keyword_provider) {} |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ | 125 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_CLIENT_H_ |
| OLD | NEW |