| 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" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 scoped_refptr<ShortcutsBackend> | 136 scoped_refptr<ShortcutsBackend> |
| 137 ChromeAutocompleteProviderClient::GetShortcutsBackendIfExists() { | 137 ChromeAutocompleteProviderClient::GetShortcutsBackendIfExists() { |
| 138 return ShortcutsBackendFactory::GetForProfileIfExists(profile_); | 138 return ShortcutsBackendFactory::GetForProfileIfExists(profile_); |
| 139 } | 139 } |
| 140 | 140 |
| 141 std::unique_ptr<KeywordExtensionsDelegate> | 141 std::unique_ptr<KeywordExtensionsDelegate> |
| 142 ChromeAutocompleteProviderClient::GetKeywordExtensionsDelegate( | 142 ChromeAutocompleteProviderClient::GetKeywordExtensionsDelegate( |
| 143 KeywordProvider* keyword_provider) { | 143 KeywordProvider* keyword_provider) { |
| 144 #if defined(ENABLE_EXTENSIONS) | 144 #if defined(ENABLE_EXTENSIONS) |
| 145 return base::WrapUnique( | 145 return base::MakeUnique<KeywordExtensionsDelegateImpl>(profile_, |
| 146 new KeywordExtensionsDelegateImpl(profile_, keyword_provider)); | 146 keyword_provider); |
| 147 #else | 147 #else |
| 148 return nullptr; | 148 return nullptr; |
| 149 #endif | 149 #endif |
| 150 } | 150 } |
| 151 | 151 |
| 152 PhysicalWebDataSource* | 152 PhysicalWebDataSource* |
| 153 ChromeAutocompleteProviderClient::GetPhysicalWebDataSource() { | 153 ChromeAutocompleteProviderClient::GetPhysicalWebDataSource() { |
| 154 return nullptr; | 154 return nullptr; |
| 155 } | 155 } |
| 156 | 156 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 image_service->Prefetch(url); | 241 image_service->Prefetch(url); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( | 244 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( |
| 245 AutocompleteController* controller) { | 245 AutocompleteController* controller) { |
| 246 content::NotificationService::current()->Notify( | 246 content::NotificationService::current()->Notify( |
| 247 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, | 247 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, |
| 248 content::Source<AutocompleteController>(controller), | 248 content::Source<AutocompleteController>(controller), |
| 249 content::NotificationService::NoDetails()); | 249 content::NotificationService::NoDetails()); |
| 250 } | 250 } |
| OLD | NEW |