diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 00:56:28 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 00:56:28 +0000 |
commit | cb84d644eccdc493dbfd55809cffb4c4410be12d (patch) | |
tree | f9eb62bc1ef17ffe71317dc16b47ec1b464a02a9 /chrome/browser/chromeos | |
parent | 434924590c7434c8c804bc4669d0835135d020ad (diff) | |
download | chromium_src-cb84d644eccdc493dbfd55809cffb4c4410be12d.zip chromium_src-cb84d644eccdc493dbfd55809cffb4c4410be12d.tar.gz chromium_src-cb84d644eccdc493dbfd55809cffb4c4410be12d.tar.bz2 |
Make the reload button respond to middle-clicks like back/forward/home already do.
This also makes GTK and Mac reset the location bar in the correct cases with various types of clicks on back/forward.
BUG=none
TEST=Middle-click reload. It should reload the page in a new background tab.
Review URL: http://codereview.chromium.org/2779011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/compact_location_bar_view.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/compact_location_bar_view.cc b/chrome/browser/chromeos/compact_location_bar_view.cc index cfffec2..bec7646f 100644 --- a/chrome/browser/chromeos/compact_location_bar_view.cc +++ b/chrome/browser/chromeos/compact_location_bar_view.cc @@ -195,14 +195,19 @@ void CompactLocationBarView::Focus() { void CompactLocationBarView::ButtonPressed(views::Button* sender, const views::Event& event) { int id = sender->tag(); - // Shift-clicking or Ctrl-clicking the reload button means we should + int flags = sender->mouse_event_flags(); + // Shift-clicking or ctrl-clicking the reload button means we should // ignore any cached content. // TODO(avayvod): eliminate duplication of this logic in // CompactLocationBarView. - if (id == IDC_RELOAD && (event.IsShiftDown() || event.IsControlDown())) + if (id == IDC_RELOAD && (event.IsShiftDown() || event.IsControlDown())) { id = IDC_RELOAD_IGNORING_CACHE; + // Mask off shift/ctrl so they aren't interpreted as affecting the + // disposition below. + flags &= ~(views::Event::EF_SHIFT_DOWN | views::Event::EF_CONTROL_DOWN); + } browser()->ExecuteCommandWithDisposition( - id, event_utils::DispositionFromEventFlags(sender->mouse_event_flags())); + id, event_utils::DispositionFromEventFlags(flags)); } //////////////////////////////////////////////////////////////////////////////// |