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

Unified Diff: chrome/browser/chromeos/compact_location_bar_view.cc

Issue 2779011: Make the reload button respond to middle-clicks like back/forward/home alread... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/compact_location_bar_view.cc
===================================================================
--- chrome/browser/chromeos/compact_location_bar_view.cc (revision 49315)
+++ chrome/browser/chromeos/compact_location_bar_view.cc (working copy)
@@ -195,14 +195,19 @@
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));
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698