Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_edit_model.h |
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h |
| index 2c1563a238698743224f8b5a0bbc566b6d5c65ef..beda6f033f2aece7bd76874981cb94f2b94141a0 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.h |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h |
| @@ -12,6 +12,7 @@ |
| #include "base/time.h" |
| #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" |
| #include "chrome/browser/autocomplete/autocomplete_match.h" |
| +#include "chrome/browser/ui/omnibox/omnibox_controller.h" |
| #include "chrome/common/metrics/proto/omnibox_event.pb.h" |
| #include "chrome/common/omnibox_focus_state.h" |
| #include "content/public/common/page_transition_types.h" |
| @@ -57,7 +58,7 @@ enum EnteredKeywordModeMethod { |
| ENTERED_KEYWORD_MODE_NUM_ITEMS |
| }; |
| -class OmniboxEditModel : public AutocompleteControllerDelegate { |
| +class OmniboxEditModel { |
| public: |
| struct State { |
| State(bool user_input_in_progress, |
| @@ -82,7 +83,7 @@ class OmniboxEditModel : public AutocompleteControllerDelegate { |
| virtual ~OmniboxEditModel(); |
| AutocompleteController* autocomplete_controller() const { |
|
Peter Kasting
2013/04/25 18:24:55
Ultimately, this accessor will disappear, right?
beaudoin
2013/04/25 20:34:51
It's used in ui_test_utils.cc. Instead of expandin
|
| - return autocomplete_controller_.get(); |
| + return omnibox_controller_->autocomplete_controller(); |
| } |
| void set_popup_model(OmniboxPopupModel* popup_model) { |
| @@ -315,6 +316,9 @@ class OmniboxEditModel : public AutocompleteControllerDelegate { |
| // is in screen coordinates. |
| void OnPopupBoundsChanged(const gfx::Rect& bounds); |
| + // Called when the results have changed in the OmniboxController. |
| + void OnResultChanged(bool default_match_changed); |
| + |
| private: |
| friend class InstantTestBase; |
| @@ -343,9 +347,6 @@ class OmniboxEditModel : public AutocompleteControllerDelegate { |
| // he intended to hit "ctrl-enter". |
| }; |
| - // AutocompleteControllerDelegate: |
| - virtual void OnResultChanged(bool default_match_changed) OVERRIDE; |
| - |
| // Returns true if a query to an autocomplete provider is currently |
| // in progress. This logic should in the future live in |
| // AutocompleteController but resides here for now. This method is used by |
| @@ -434,7 +435,7 @@ class OmniboxEditModel : public AutocompleteControllerDelegate { |
| // the view. |
| void SetFocusState(OmniboxFocusState state, OmniboxFocusChangeReason reason); |
| - scoped_ptr<AutocompleteController> autocomplete_controller_; |
| + scoped_ptr<OmniboxController> omnibox_controller_; |
| OmniboxView* view_; |