diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 21:14:44 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 21:14:44 +0000 |
commit | 992edd121c5c1ccb7e4fe94cccd35a9500079637 (patch) | |
tree | 619d934cacda11c0d196d0391a541c4eb54d81c2 /chrome/browser/cocoa/hung_renderer_controller.mm | |
parent | 494656dcbf45201c79d1a9387f3e1ecfe0b6d2ad (diff) | |
download | chromium_src-992edd121c5c1ccb7e4fe94cccd35a9500079637.zip chromium_src-992edd121c5c1ccb7e4fe94cccd35a9500079637.tar.gz chromium_src-992edd121c5c1ccb7e4fe94cccd35a9500079637.tar.bz2 |
Hung Renderer dialog should dismiss with "Wait" for Enter or Esc
HungRendererDialog.xib: made the "Wait" button's use Return as its normal key
equivalent; changed the "Wait" button's class to MultiKeyEquivalentButton.
BUG=21074
TEST=about:hang. Return, Enter, Esc, and Command-. (period) should all dismiss
the Hung Renderer dialog with "Wait".
Review URL: http://codereview.chromium.org/266026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/hung_renderer_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/hung_renderer_controller.mm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/hung_renderer_controller.mm b/chrome/browser/cocoa/hung_renderer_controller.mm index 54c4c9d..8967389 100644 --- a/chrome/browser/cocoa/hung_renderer_controller.mm +++ b/chrome/browser/cocoa/hung_renderer_controller.mm @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#import "chrome/browser/cocoa/hung_renderer_controller.h" + #import <Cocoa/Cocoa.h> #include "app/resource_bundle.h" @@ -11,7 +13,7 @@ #include "base/sys_string_conversions.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/hung_renderer_dialog.h" -#import "chrome/browser/cocoa/hung_renderer_controller.h" +#import "chrome/browser/cocoa/multi_key_equivalent_button.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/result_codes.h" @@ -63,6 +65,12 @@ HungRendererController* g_instance = NULL; [GTMUILocalizerAndLayoutTweaker resizeWindowWithoutAutoResizingSubViews:[self window] delta:windowDelta]; + + // Make the "wait" button respond to additional keys. By setting this to + // @"\e", it will respond to both Esc and Command-. (period). + KeyEquivalentAndModifierMask key; + key.charCode = @"\e"; + [waitButton_ addKeyEquivalent:key]; } - (IBAction)kill:(id)sender { @@ -135,7 +143,7 @@ HungRendererController* g_instance = NULL; return killButton_; } -- (NSButton*)waitButton { +- (MultiKeyEquivalentButton*)waitButton { return waitButton_; } @end |