summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/chrome_dll.rc5
-rw-r--r--chrome/browser/chromeos/compact_location_bar_view.cc10
-rw-r--r--chrome/browser/views/toolbar_view.cc6
3 files changed, 17 insertions, 4 deletions
diff --git a/chrome/app/chrome_dll.rc b/chrome/app/chrome_dll.rc
index 6320f22..7ed9edf 100644
--- a/chrome/app/chrome_dll.rc
+++ b/chrome/app/chrome_dll.rc
@@ -85,9 +85,10 @@ BEGIN
"O", IDC_OPEN_FILE, VIRTKEY, CONTROL
"P", IDC_PRINT, VIRTKEY, CONTROL
"R", IDC_RELOAD, VIRTKEY, CONTROL
+ "R", IDC_RELOAD_IGNORING_CACHE, VIRTKEY, CONTROL, SHIFT
VK_F5, IDC_RELOAD, VIRTKEY
- VK_F5, IDC_RELOAD, VIRTKEY, CONTROL
- VK_F5, IDC_RELOAD, VIRTKEY, SHIFT
+ VK_F5, IDC_RELOAD_IGNORING_CACHE, VIRTKEY, CONTROL
+ VK_F5, IDC_RELOAD_IGNORING_CACHE, VIRTKEY, SHIFT
VK_HOME, IDC_HOME, VIRTKEY, ALT
"T", IDC_RESTORE_TAB, VIRTKEY, CONTROL, SHIFT
"S", IDC_SAVE_PAGE, VIRTKEY, CONTROL
diff --git a/chrome/browser/chromeos/compact_location_bar_view.cc b/chrome/browser/chromeos/compact_location_bar_view.cc
index ba69aab..2083664 100644
--- a/chrome/browser/chromeos/compact_location_bar_view.cc
+++ b/chrome/browser/chromeos/compact_location_bar_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -211,8 +211,14 @@ void CompactLocationBarView::Focus() {
// views::ButtonListener overrides:
void CompactLocationBarView::ButtonPressed(views::Button* sender,
- const views::Event& event) {
+ const views::Event& event) {
int id = sender->tag();
+ // 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()))
+ id = IDC_RELOAD_IGNORING_CACHE;
browser()->ExecuteCommandWithDisposition(
id, event_utils::DispositionFromEventFlags(sender->mouse_event_flags()));
}
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 2d18cad..b2125d4 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -233,6 +233,12 @@ void ToolbarView::ButtonPressed(
// ongoing user edits, since it doesn't realize this is a user-initiated
// action.
location_bar_->Revert();
+ // 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()))
+ id = IDC_RELOAD_IGNORING_CACHE;
break;
}
browser_->ExecuteCommandWithDisposition(