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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_controller.cc

Issue 510783002: Rename AutocompleteProviderDelegate to AutocompleteProviderClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/chrome_autocomplete_provider_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/autocomplete_controller.h" 5 #include "chrome/browser/autocomplete/autocomplete_controller.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" 16 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
17 #include "chrome/browser/autocomplete/bookmark_provider.h" 17 #include "chrome/browser/autocomplete/bookmark_provider.h"
18 #include "chrome/browser/autocomplete/builtin_provider.h" 18 #include "chrome/browser/autocomplete/builtin_provider.h"
19 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_delegate.h" 19 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h"
20 #include "chrome/browser/autocomplete/history_quick_provider.h" 20 #include "chrome/browser/autocomplete/history_quick_provider.h"
21 #include "chrome/browser/autocomplete/history_url_provider.h" 21 #include "chrome/browser/autocomplete/history_url_provider.h"
22 #include "chrome/browser/autocomplete/shortcuts_provider.h" 22 #include "chrome/browser/autocomplete/shortcuts_provider.h"
23 #include "chrome/browser/autocomplete/zero_suggest_provider.h" 23 #include "chrome/browser/autocomplete/zero_suggest_provider.h"
24 #include "chrome/browser/chrome_notification_types.h" 24 #include "chrome/browser/chrome_notification_types.h"
25 #include "components/omnibox/keyword_provider.h" 25 #include "components/omnibox/keyword_provider.h"
26 #include "components/omnibox/omnibox_field_trial.h" 26 #include "components/omnibox/omnibox_field_trial.h"
27 #include "components/omnibox/search_provider.h" 27 #include "components/omnibox/search_provider.h"
28 #include "components/search_engines/template_url.h" 28 #include "components/search_engines/template_url.h"
29 #include "components/search_engines/template_url_service.h" 29 #include "components/search_engines/template_url_service.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #if defined(ENABLE_EXTENSIONS) 203 #if defined(ENABLE_EXTENSIONS)
204 keyword_provider_->set_extensions_delegate( 204 keyword_provider_->set_extensions_delegate(
205 scoped_ptr<KeywordExtensionsDelegate>( 205 scoped_ptr<KeywordExtensionsDelegate>(
206 new KeywordExtensionsDelegateImpl(profile, keyword_provider_))); 206 new KeywordExtensionsDelegateImpl(profile, keyword_provider_)));
207 #endif 207 #endif
208 providers_.push_back(keyword_provider_); 208 providers_.push_back(keyword_provider_);
209 } 209 }
210 #endif 210 #endif
211 if (provider_types & AutocompleteProvider::TYPE_SEARCH) { 211 if (provider_types & AutocompleteProvider::TYPE_SEARCH) {
212 search_provider_ = new SearchProvider( 212 search_provider_ = new SearchProvider(
213 this, template_url_service, scoped_ptr<AutocompleteProviderDelegate>( 213 this, template_url_service, scoped_ptr<AutocompleteProviderClient>(
214 new ChromeAutocompleteProviderDelegate(profile))); 214 new ChromeAutocompleteProviderClient(profile)));
215 providers_.push_back(search_provider_); 215 providers_.push_back(search_provider_);
216 } 216 }
217 if (provider_types & AutocompleteProvider::TYPE_SHORTCUTS) 217 if (provider_types & AutocompleteProvider::TYPE_SHORTCUTS)
218 providers_.push_back(new ShortcutsProvider(profile)); 218 providers_.push_back(new ShortcutsProvider(profile));
219 if (provider_types & AutocompleteProvider::TYPE_ZERO_SUGGEST) { 219 if (provider_types & AutocompleteProvider::TYPE_ZERO_SUGGEST) {
220 zero_suggest_provider_ = ZeroSuggestProvider::Create( 220 zero_suggest_provider_ = ZeroSuggestProvider::Create(
221 this, template_url_service, profile); 221 this, template_url_service, profile);
222 if (zero_suggest_provider_) 222 if (zero_suggest_provider_)
223 providers_.push_back(zero_suggest_provider_); 223 providers_.push_back(zero_suggest_provider_);
224 } 224 }
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 this, &AutocompleteController::ExpireCopiedEntries); 679 this, &AutocompleteController::ExpireCopiedEntries);
680 } 680 }
681 681
682 void AutocompleteController::StartStopTimer() { 682 void AutocompleteController::StartStopTimer() {
683 stop_timer_.Start(FROM_HERE, 683 stop_timer_.Start(FROM_HERE,
684 stop_timer_duration_, 684 stop_timer_duration_,
685 base::Bind(&AutocompleteController::Stop, 685 base::Bind(&AutocompleteController::Stop,
686 base::Unretained(this), 686 base::Unretained(this),
687 false)); 687 false));
688 } 688 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/chrome_autocomplete_provider_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698