OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/omnibox/omnibox_controller.h" | |
6 | |
7 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | |
8 #include "chrome/browser/autocomplete/autocomplete_controller.h" | |
9 #include "chrome/browser/search/search.h" | |
10 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" | |
11 | |
Peter Kasting
2013/04/25 18:24:55
Tiny nit: I've slowly been moving towards two newl
beaudoin
2013/04/25 20:34:51
Happy to adopt this. I've done it in the tests too
| |
12 OmniboxController::OmniboxController(OmniboxEditModel* omnibox_edit_model, | |
13 Profile* profile) | |
14 : omnibox_edit_model_(omnibox_edit_model) { | |
15 // Use a restricted subset of the autocomplete providers if we're using the | |
16 // Instant Extended API, as it doesn't support them all. | |
Peter Kasting
2013/04/25 18:24:55
Nit: Comment is unnecessary
beaudoin
2013/04/25 20:34:51
Done.
| |
17 autocomplete_controller_.reset(new AutocompleteController(profile, this, | |
18 chrome::IsInstantExtendedAPIEnabled() ? | |
19 AutocompleteClassifier::kInstantExtendedOmniboxProviders : | |
20 AutocompleteClassifier::kDefaultOmniboxProviders)); | |
21 } | |
22 | |
23 OmniboxController::~OmniboxController() { | |
24 } | |
25 | |
26 void OmniboxController::OnResultChanged(bool default_match_changed) { | |
27 omnibox_edit_model_->OnResultChanged(default_match_changed); | |
28 } | |
OLD | NEW |