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

Unified Diff: chrome/browser/ui/omnibox/omnibox_controller.cc

Issue 13932034: Omnibox refactor, introduced OmniboxController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered Peter's comments. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
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..d99214ce4e9fac77fd31b52233060409a05564be
--- /dev/null
+++ b/chrome/browser/ui/omnibox/omnibox_controller.cc
@@ -0,0 +1,27 @@
+// 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) {
+ 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);
+}

Powered by Google App Engine
This is Rietveld 408576698