| 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..bac50dab7dc48e60370b76901047a5a99ee6a9e5
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/omnibox/omnibox_controller.cc
|
| @@ -0,0 +1,29 @@
|
| +// 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"
|
| +
|
| +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.
|
| + 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);
|
| +}
|
|
|