diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-20 23:03:14 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-20 23:03:14 +0000 |
commit | 1fc025209fbaeb2eb91cfeac8dbced8bc493f3b2 (patch) | |
tree | 13faf73a68138e0cd30e7b628a677ebb0422aa8c /chrome/browser/autocomplete/autocomplete_edit.cc | |
parent | 91f57782b0dd7a847b8d31020003f00099366545 (diff) | |
download | chromium_src-1fc025209fbaeb2eb91cfeac8dbced8bc493f3b2.zip chromium_src-1fc025209fbaeb2eb91cfeac8dbced8bc493f3b2.tar.gz chromium_src-1fc025209fbaeb2eb91cfeac8dbced8bc493f3b2.tar.bz2 |
Rework the command updater to not be dependent on views::Button (needed for porting).
TEST=make sure back/forward buttons still enable/disable correctly depending on the length of the back/forward navigation list.
Review URL: http://codereview.chromium.org/18343
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit.cc')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc index 4c4da0e..4928b16 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.cc +++ b/chrome/browser/autocomplete/autocomplete_edit.cc @@ -18,7 +18,7 @@ #include "chrome/browser/autocomplete/edit_drop_target.h" #include "chrome/browser/autocomplete/keyword_provider.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/controller.h" +#include "chrome/browser/command_updater.h" #include "chrome/browser/drag_utils.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/net/url_fixer_upper.h" @@ -659,7 +659,7 @@ AutocompleteEditView::AutocompleteEditView( views::View* parent_view, HWND hwnd, Profile* profile, - CommandController* command_controller, + CommandUpdater* command_updater, bool popup_window_mode) : model_(new AutocompleteEditModel(this, controller, profile)), popup_model_(new AutocompletePopupModel(font, this, model_.get(), @@ -667,7 +667,7 @@ AutocompleteEditView::AutocompleteEditView( controller_(controller), parent_view_(parent_view), toolbar_model_(toolbar_model), - command_controller_(command_controller), + command_updater_(command_updater), popup_window_mode_(popup_window_mode), tracking_click_(false), tracking_double_click_(false), @@ -1184,7 +1184,7 @@ bool AutocompleteEditView::IsCommandEnabled(int id) const { case IDS_PASTE_AND_GO: return CanPasteAndGo(GetClipboardText()); case IDS_SELECT_ALL: return !!CanSelectAll(); case IDS_EDIT_SEARCH_ENGINES: - return command_controller_->IsCommandEnabled(IDC_EDIT_SEARCH_ENGINES); + return command_updater_->IsCommandEnabled(IDC_EDIT_SEARCH_ENGINES); default: NOTREACHED(); return false; } } @@ -1232,7 +1232,7 @@ void AutocompleteEditView::ExecuteCommand(int id) { break; case IDS_EDIT_SEARCH_ENGINES: - command_controller_->ExecuteCommand(IDC_EDIT_SEARCH_ENGINES); + command_updater_->ExecuteCommand(IDC_EDIT_SEARCH_ENGINES); break; default: |