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

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

Issue 14358005: Omnibox refactor, moved OnResultChanged to OmniboxController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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
index 736fcad89bdc889a692a4adc13f16df6a70c3978..17d50d70042f9b60d08f8abe2830f718f89c1801 100644
--- a/chrome/browser/ui/omnibox/omnibox_controller.h
+++ b/chrome/browser/ui/omnibox/omnibox_controller.h
@@ -5,14 +5,23 @@
#ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
#define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
+#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
class AutocompleteController;
+struct AutocompleteMatch;
+class AutocompleteResult;
+class GURL;
class OmniboxEditModel;
+class OmniboxPopupModel;
class Profile;
+namespace gfx {
+class Rect;
+}
+
// This class controls the various services that can modify the content
// for the omnibox, including AutocompleteController and InstantController. It
// is responsible of updating the omnibox content.
@@ -34,11 +43,36 @@ class OmniboxController : public AutocompleteControllerDelegate {
return autocomplete_controller_.get();
}
+ void set_popup_model(OmniboxPopupModel* popup_model) {
+ popup_ = popup_model;
+ }
+
+ // TODO(beaudoin): The edit and popup model should be siblings owned by the
+ // LocationBarView, making this accessor unnecessary.
+ OmniboxPopupModel* popup_model() const { return popup_; }
+
+ // Turns off keyword mode for the current match.
+ void ClearPopupKeywordMode() const;
+
+ const AutocompleteResult& result() const;
+
+ // TODO(beaudoin): Make private once OmniboxEditModel no longer refers to it.
+ void DoPreconnect(const AutocompleteMatch& match);
+
+ // TODO(beaudoin): Make private once OmniboxEditModel no longer refers to it.
+ // Invoked when the popup has changed its bounds to |bounds|. |bounds| here
+ // is in screen coordinates.
+ void OnPopupBoundsChanged(const gfx::Rect& bounds);
+
private:
// Weak, it owns us.
// TODO(beaudoin): Consider defining a delegate to ease unit testing.
OmniboxEditModel* omnibox_edit_model_;
+ Profile* profile_;
+
+ OmniboxPopupModel* popup_;
+
scoped_ptr<AutocompleteController> autocomplete_controller_;
DISALLOW_COPY_AND_ASSIGN(OmniboxController);
« 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