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

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

Issue 13932034: Omnibox refactor, introduced OmniboxController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned some 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.h
diff --git a/chrome/browser/ui/omnibox/omnibox_controller.h b/chrome/browser/ui/omnibox/omnibox_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..13f223fb75ba8302126b9b77863c353d61a3822c
--- /dev/null
+++ b/chrome/browser/ui/omnibox/omnibox_controller.h
@@ -0,0 +1,45 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
+#define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
+
+class AutocompleteController;
+class OmniboxEditModel;
+class Profile;
+
+// This class sits between the OmniboxEditModel and AutocompleteController.
+// TODO(beaudoin): Keep on expanding this class so that OmniboxEditModel no
+// longer need to hold any reference to AutocompleteController. Also make
+// this the point of contact between InstantController and OmniboxEditModel.
+class OmniboxController : public AutocompleteControllerDelegate {
+
+ public:
+ OmniboxController(OmniboxEditModel* omnibox_edit_model,
+ Profile* profile);
+ virtual ~OmniboxController();
+
+ AutocompleteController* autocomplete_controller() const {
+ return autocomplete_controller_.get();
+ }
+
+ // AutocompleteControllerDelegate:
+ virtual void OnResultChanged(bool default_match_changed) OVERRIDE;
+
+ private:
+ // Weak, it owns us.
+ // TODO(beaudoin): When we have a clearer picture of the interface between
+ // this and OmniboxEditModel define and use a Delegate interface instead.
+ OmniboxEditModel* omnibox_edit_model_;
+
+ scoped_ptr<AutocompleteController> autocomplete_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(OmniboxController);
+};
+
+#endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_controller.cc » ('j') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698