From 0f2f9b55430675e7fb9ff9dd915554075b728515 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 8 Dec 2015 11:20:07 +0800 Subject: [PATCH] No need to use CommandDispatcher --- atom/browser/native_window_mac.mm | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index d7ed15c..ef33a11 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -18,7 +18,6 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host_view.h" #include "native_mate/dictionary.h" -#import "ui/base/cocoa/command_dispatcher.h" #include "ui/gfx/skia_util.h" namespace { @@ -209,11 +208,10 @@ bool ScopedDisableResize::disable_resize_ = false; @end -@interface AtomNSWindow : NSWindow { +@interface AtomNSWindow : NSWindow { @private atom::NativeWindowMac* shell_; bool enable_larger_than_screen_; - base::scoped_nsobject commandDispatcher_; } @property BOOL acceptsFirstMouse; @property BOOL disableAutoHideCursor; @@ -227,7 +225,6 @@ bool ScopedDisableResize::disable_resize_ = false; - (void)setShell:(atom::NativeWindowMac*)shell { shell_ = shell; - commandDispatcher_.reset([[CommandDispatcher alloc] initWithOwner:self]); } - (void)setEnableLargerThanScreen:(bool)enable { @@ -276,25 +273,6 @@ bool ScopedDisableResize::disable_resize_ = false; return !self.disableKeyOrMainWindow; } -// CommandDispatchingWindow implementation. - -- (void)setCommandHandler:(id)commandHandler { -} - -- (BOOL)redispatchKeyEvent:(NSEvent*)event { - return [commandDispatcher_ redispatchKeyEvent:event]; -} - -- (BOOL)defaultPerformKeyEquivalent:(NSEvent*)event { - return [super performKeyEquivalent:event]; -} - -- (void)commandDispatch:(id)sender { -} - -- (void)commandDispatchUsingKeyModifiers:(id)sender { -} - @end @interface ControlRegionView : NSView -- 2.7.4