From 28a45c708dd128ee9e61c547f7d10cd55530f374 Mon Sep 17 00:00:00 2001 From: "idanan@chromium.org" Date: Tue, 24 Mar 2009 19:06:12 +0000 Subject: Issue 6477: Support modifier clicks on UI elements Mouse event flags transformed to WindoOpenDisposition so that browser commands can all inteterpert event modifiers. Implemented home, forward and backwards middle-click andshift middle click. Previously working on issue 358 which was market a duplicate and concerned with the home and tabstrip subset of this behavior: Can't open a new tab by middle-clicking home button. No functionality has been lost or altered, only the use ofmodifiers give access to increased functionality. BUG=6477 TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12383 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/go_button.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'chrome/browser/views/go_button.h') diff --git a/chrome/browser/views/go_button.h b/chrome/browser/views/go_button.h index c9d8252..a830191 100644 --- a/chrome/browser/views/go_button.h +++ b/chrome/browser/views/go_button.h @@ -8,7 +8,7 @@ #include "chrome/views/controls/button/image_button.h" #include "base/task.h" -class CommandUpdater; +class Browser; class LocationBarView; //////////////////////////////////////////////////////////////////////////////// @@ -26,9 +26,7 @@ class LocationBarView; class GoButton : public views::ToggleImageButton, public views::ButtonListener { public: - // TODO(beng): get rid of the command updater param and instead have a - // delegate. - GoButton(LocationBarView* location_bar, CommandUpdater* command_updater); + GoButton(LocationBarView* location_bar, Browser* Browser); virtual ~GoButton(); typedef enum Mode { MODE_GO = 0, MODE_STOP }; @@ -42,7 +40,7 @@ class GoButton : public views::ToggleImageButton, // Overridden from views::ButtonListener: virtual void ButtonPressed(views::Button* button); - + // Overridden from views::View: virtual void OnMouseExited(const views::MouseEvent& e); virtual bool GetTooltipText(int x, int y, std::wstring* tooltip); @@ -54,7 +52,7 @@ class GoButton : public views::ToggleImageButton, ScopedRunnableMethodFactory stop_timer_; LocationBarView* location_bar_; - CommandUpdater* command_updater_; + Browser* browser_; // The mode we should be in Mode intended_mode_; -- cgit v1.1