summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/interstitial_page.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 01:25:41 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 01:25:41 +0000
commit97df4b330f4a2b1a34adb1eb8e5f5e7f60d716ff (patch)
tree46cd48cb3b533fb88bb6e6975427e7741578cb5c /chrome/browser/tab_contents/interstitial_page.cc
parent7a0f5a3abf37e21eb15f4fe4058e917426e2e105 (diff)
downloadchromium_src-97df4b330f4a2b1a34adb1eb8e5f5e7f60d716ff.zip
chromium_src-97df4b330f4a2b1a34adb1eb8e5f5e7f60d716ff.tar.gz
chromium_src-97df4b330f4a2b1a34adb1eb8e5f5e7f60d716ff.tar.bz2
Don't send tab switching/killing/creating keyboard accelerators to pages. This avoids tabs maliciously preventing closing using ctrl+f4/ctrl+w/alt+f4, and also hung/slow renderers from making tab cycling sluggish.
BUG=5496 TEST=added ui test Review URL: http://codereview.chromium.org/224023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/interstitial_page.cc')
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 4191d4d..935dc1c 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -93,6 +93,7 @@ class InterstitialPage::InterstitialPageRVHViewDelegate
virtual void UpdateDragCursor(WebDragOperation operation);
virtual void GotFocus();
virtual void TakeFocus(bool reverse);
+ virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event);
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
virtual void HandleMouseEvent();
virtual void HandleMouseLeave();
@@ -575,6 +576,11 @@ void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus(
interstitial_page_->tab()->GetViewDelegate()->TakeFocus(reverse);
}
+bool InterstitialPage::InterstitialPageRVHViewDelegate::IsReservedAccelerator(
+ const NativeWebKeyboardEvent& event) {
+ return false;
+}
+
void InterstitialPage::InterstitialPageRVHViewDelegate::HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) {
if (interstitial_page_->tab() && interstitial_page_->tab()->GetViewDelegate())