Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_controller.cc |
| diff --git a/chrome/browser/ui/omnibox/omnibox_controller.cc b/chrome/browser/ui/omnibox/omnibox_controller.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f3d53342605cfe4101dcd1e8c48ab182d436a0e5 |
| --- /dev/null |
| +++ b/chrome/browser/ui/omnibox/omnibox_controller.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/ui/omnibox/omnibox_controller.h" |
| + |
| +#include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| +#include "chrome/browser/autocomplete/autocomplete_controller.h" |
| +#include "chrome/browser/search/search.h" |
| +#include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
| + |
|
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
|
| +OmniboxController::OmniboxController(OmniboxEditModel* omnibox_edit_model, |
| + Profile* profile) |
| + : omnibox_edit_model_(omnibox_edit_model) { |
| + // Use a restricted subset of the autocomplete providers if we're using the |
| + // 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.
|
| + autocomplete_controller_.reset(new AutocompleteController(profile, this, |
| + chrome::IsInstantExtendedAPIEnabled() ? |
| + AutocompleteClassifier::kInstantExtendedOmniboxProviders : |
| + AutocompleteClassifier::kDefaultOmniboxProviders)); |
| +} |
| + |
| +OmniboxController::~OmniboxController() { |
| +} |
| + |
| +void OmniboxController::OnResultChanged(bool default_match_changed) { |
| + omnibox_edit_model_->OnResultChanged(default_match_changed); |
| +} |