Chromium Code Reviews| 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 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | 5 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" | 13 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
| 14 #include "chrome/browser/autocomplete/contextual_suggestions_service_factory.h" | |
| 14 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" | 15 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" |
| 15 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 16 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
| 16 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" | 17 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" |
| 17 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h" | 18 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h" |
| 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 19 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" | 21 #include "chrome/browser/chrome_notification_types.h" |
| 21 #include "chrome/browser/history/history_service_factory.h" | 22 #include "chrome/browser/history/history_service_factory.h" |
| 22 #include "chrome/browser/history/top_sites_factory.h" | 23 #include "chrome/browser/history/top_sites_factory.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 | 120 |
| 120 TemplateURLService* ChromeAutocompleteProviderClient::GetTemplateURLService() { | 121 TemplateURLService* ChromeAutocompleteProviderClient::GetTemplateURLService() { |
| 121 return TemplateURLServiceFactory::GetForProfile(profile_); | 122 return TemplateURLServiceFactory::GetForProfile(profile_); |
| 122 } | 123 } |
| 123 | 124 |
| 124 const TemplateURLService* | 125 const TemplateURLService* |
| 125 ChromeAutocompleteProviderClient::GetTemplateURLService() const { | 126 ChromeAutocompleteProviderClient::GetTemplateURLService() const { |
| 126 return TemplateURLServiceFactory::GetForProfile(profile_); | 127 return TemplateURLServiceFactory::GetForProfile(profile_); |
| 127 } | 128 } |
| 128 | 129 |
| 130 contextual_suggestions::ContextualSuggestionsService* | |
|
Mark P
2017/07/07 20:13:54
#include the file that gives you contextual_sugges
gcomanici
2017/07/07 21:24:45
Done.
| |
| 131 ChromeAutocompleteProviderClient::GetContextualSuggestionsService() const { | |
| 132 return ContextualSuggestionsServiceFactory::GetForProfile(profile_); | |
| 133 } | |
| 134 | |
| 129 const | 135 const |
| 130 SearchTermsData& ChromeAutocompleteProviderClient::GetSearchTermsData() const { | 136 SearchTermsData& ChromeAutocompleteProviderClient::GetSearchTermsData() const { |
| 131 return search_terms_data_; | 137 return search_terms_data_; |
| 132 } | 138 } |
| 133 | 139 |
| 134 scoped_refptr<ShortcutsBackend> | 140 scoped_refptr<ShortcutsBackend> |
| 135 ChromeAutocompleteProviderClient::GetShortcutsBackend() { | 141 ChromeAutocompleteProviderClient::GetShortcutsBackend() { |
| 136 return ShortcutsBackendFactory::GetForProfile(profile_); | 142 return ShortcutsBackendFactory::GetForProfile(profile_); |
| 137 } | 143 } |
| 138 | 144 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 284 image_service->Prefetch(url, traffic_annotation); | 290 image_service->Prefetch(url, traffic_annotation); |
| 285 } | 291 } |
| 286 | 292 |
| 287 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( | 293 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( |
| 288 AutocompleteController* controller) { | 294 AutocompleteController* controller) { |
| 289 content::NotificationService::current()->Notify( | 295 content::NotificationService::current()->Notify( |
| 290 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, | 296 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, |
| 291 content::Source<AutocompleteController>(controller), | 297 content::Source<AutocompleteController>(controller), |
| 292 content::NotificationService::NoDetails()); | 298 content::NotificationService::NoDetails()); |
| 293 } | 299 } |
| OLD | NEW |