summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 04:38:50 +0000
committeravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 04:38:50 +0000
commit0c13b4a1a56078265821f10b5bb77a4ac2f891ce (patch)
tree7e0446e605bf67dbe9d9e83de96bbcaead1a68d4
parentbfcd1688e9a59ffd52c5073b9e4bb528bd53df74 (diff)
downloadchromium_src-0c13b4a1a56078265821f10b5bb77a4ac2f891ce.zip
chromium_src-0c13b4a1a56078265821f10b5bb77a4ac2f891ce.tar.gz
chromium_src-0c13b4a1a56078265821f10b5bb77a4ac2f891ce.tar.bz2
Bound page reloading ignoring cache to the following user actions:
- pressing Ctrl+F5 or Shift+F5 or Ctrl+Shift+R - Shift- or Ctrl-clicking the Reload button. Should work on Windows and Chrome OS (including compact navigation mode). BUG=36244 TEST=Verify that everything works as described above. Review URL: http://codereview.chromium.org/650048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39543 0039d316-1c4b-4281-b951-d872f2087c98
-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(