]> khamidou — GitHub mirrors - electron.git/commitdiff
No need to use CommandDispatcher
authorCheng Zhao <zcbenz@gmail.com>
Tue, 8 Dec 2015 03:20:07 +0000 (11:20 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 8 Dec 2015 03:20:07 +0000 (11:20 +0800)
atom/browser/native_window_mac.mm

index d7ed15cf07089ec14d6ca749fc8523e064075706..ef33a119e107c5d13ebecbc355e988c58ffca770 100644 (file)
@@ -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<CommandDispatchingWindow> {
+@interface AtomNSWindow : NSWindow {
  @private
   atom::NativeWindowMac* shell_;
   bool enable_larger_than_screen_;
-  base::scoped_nsobject<CommandDispatcher> 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<UserInterfaceItemCommandHandler>)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