summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/chrome_event_processing_window.mm
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 19:50:29 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 19:50:29 +0000
commitc4f7dfb44992c8fb9139133107e0ac9200edf241 (patch)
treee6ca6cdc567628d3481d96d56e24d58359148631 /chrome/browser/cocoa/chrome_event_processing_window.mm
parent25e979d39063ea83e0635010a3204aa6ec0b166b (diff)
downloadchromium_src-c4f7dfb44992c8fb9139133107e0ac9200edf241.zip
chromium_src-c4f7dfb44992c8fb9139133107e0ac9200edf241.tar.gz
chromium_src-c4f7dfb44992c8fb9139133107e0ac9200edf241.tar.bz2
Implemented most of HtmlDialogWindowController, which is a Cocoa port
of HtmlDialogView. Added TODO to fix inaccurate font height metric for OS X font class (and maybe width). Added the BrowserCommandExecutor protocol so that not just a BrowserWindowController can be the window controller for a ChromeEventProcessingWindow. Added unittests. Also tested manually with the bookmark sync setup wizard dialog. BUG=23073 TEST=added unittests, trybot, and manual testing Review URL: http://codereview.chromium.org/344008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/chrome_event_processing_window.mm')
-rw-r--r--chrome/browser/cocoa/chrome_event_processing_window.mm14
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/cocoa/chrome_event_processing_window.mm b/chrome/browser/cocoa/chrome_event_processing_window.mm
index 3170012..e70113a 100644
--- a/chrome/browser/cocoa/chrome_event_processing_window.mm
+++ b/chrome/browser/cocoa/chrome_event_processing_window.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/cocoa/chrome_event_processing_window.h"
#include "base/logging.h"
-#import "chrome/browser/cocoa/browser_window_controller.h"
+#import "chrome/browser/cocoa/browser_command_executor.h"
#import "chrome/browser/cocoa/browser_frame_view.h"
#import "chrome/browser/cocoa/tab_strip_controller.h"
#import "chrome/browser/renderer_host/render_widget_host_view_mac.h"
@@ -28,14 +28,12 @@ typedef int (*KeyToCommandMapper)(bool, bool, bool, bool, int);
int cmdNum = commandForKeyboardShortcut(cmdKey, shiftKey, cntrlKey, optKey,
keyCode);
- BrowserWindowController* controller =
- (BrowserWindowController*)[self delegate];
- // A bit of sanity.
- DCHECK([controller isKindOfClass:[BrowserWindowController class]]);
- DCHECK([controller respondsToSelector:@selector(executeCommand:)]);
-
if (cmdNum != -1) {
- [controller executeCommand:cmdNum];
+ id executor = [self delegate];
+ // A bit of sanity.
+ DCHECK([executor conformsToProtocol:@protocol(BrowserCommandExecutor)]);
+ DCHECK([executor respondsToSelector:@selector(executeCommand:)]);
+ [executor executeCommand:cmdNum];
return YES;
}
return NO;