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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_controller.cc

Issue 1191373002: Componentize AutocompleteController and its supporting cast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prep_builtin_provider_for_c14n
Patch Set: Rebase Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/omnibox/omnibox_controller.h" 5 #include "chrome/browser/ui/omnibox/omnibox_controller.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
9 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" 8 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h"
10 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h" 9 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h"
11 #include "chrome/browser/net/predictor.h" 10 #include "chrome/browser/net/predictor.h"
12 #include "chrome/browser/predictors/autocomplete_action_predictor.h" 11 #include "chrome/browser/predictors/autocomplete_action_predictor.h"
13 #include "chrome/browser/prerender/prerender_field_trial.h" 12 #include "chrome/browser/prerender/prerender_field_trial.h"
14 #include "chrome/browser/prerender/prerender_manager.h" 13 #include "chrome/browser/prerender/prerender_manager.h"
15 #include "chrome/browser/prerender/prerender_manager_factory.h" 14 #include "chrome/browser/prerender/prerender_manager_factory.h"
16 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/search/search.h" 17 #include "chrome/browser/search/search.h"
19 #include "chrome/browser/search_engines/template_url_service_factory.h" 18 #include "chrome/browser/search_engines/template_url_service_factory.h"
20 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" 19 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
21 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" 20 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
22 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 21 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
23 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" 22 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h"
24 #include "chrome/common/instant_types.h" 23 #include "chrome/common/instant_types.h"
24 #include "components/omnibox/autocomplete_classifier.h"
25 #include "components/omnibox/autocomplete_match.h" 25 #include "components/omnibox/autocomplete_match.h"
26 #include "components/omnibox/search_provider.h" 26 #include "components/omnibox/search_provider.h"
27 #include "components/search/search.h" 27 #include "components/search/search.h"
28 #include "extensions/common/constants.h" 28 #include "extensions/common/constants.h"
29 #include "ui/gfx/geometry/rect.h" 29 #include "ui/gfx/geometry/rect.h"
30 30
31 namespace { 31 namespace {
32 32
33 // Returns the AutocompleteMatch that the InstantController should prefetch, if 33 // Returns the AutocompleteMatch that the InstantController should prefetch, if
34 // any. 34 // any.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // We could prefetch the alternate nav URL, if any, but because there 209 // We could prefetch the alternate nav URL, if any, but because there
210 // can be many of these as a user types an initial series of characters, 210 // can be many of these as a user types an initial series of characters,
211 // the OS DNS cache could suffer eviction problems for minimal gain. 211 // the OS DNS cache could suffer eviction problems for minimal gain.
212 } 212 }
213 } 213 }
214 214
215 void OmniboxController::SetAnswerBitmap(const SkBitmap& bitmap) { 215 void OmniboxController::SetAnswerBitmap(const SkBitmap& bitmap) {
216 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID; 216 request_id_ = BitmapFetcherService::REQUEST_ID_INVALID;
217 popup_->SetAnswerBitmap(bitmap); 217 popup_->SetAnswerBitmap(bitmap);
218 } 218 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_controller.h ('k') | chrome/browser/ui/omnibox/omnibox_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698