]> khamidou — GitHub mirrors - electron.git/commitdiff
Move atom_event_processing_window to browser/ui/cocoa.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 16 Jan 2014 02:09:36 +0000 (10:09 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 16 Jan 2014 02:09:36 +0000 (10:09 +0800)
atom.gyp
browser/native_window_mac.mm
browser/ui/cocoa/event_processing_window.h [moved from browser/ui/atom_event_processing_window.h with 79% similarity]
browser/ui/cocoa/event_processing_window.mm [moved from browser/ui/atom_event_processing_window.mm with 95% similarity]

index 2daa0c61a90e58e59c1c5e61973037f088356a77..f4d52a4b6681be56f97b01d59ebea532cf2fcff1 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
       'browser/ui/accelerator_util.h',
       'browser/ui/accelerator_util_mac.mm',
       'browser/ui/accelerator_util_win.cc',
-      'browser/ui/atom_event_processing_window.h',
-      'browser/ui/atom_event_processing_window.mm',
       'browser/ui/atom_menu_controller_mac.h',
       'browser/ui/atom_menu_controller_mac.mm',
+      'browser/ui/cocoa/event_processing_window.h',
+      'browser/ui/cocoa/event_processing_window.mm',
       'browser/ui/cocoa/nsalert_synchronous_sheet.h',
       'browser/ui/cocoa/nsalert_synchronous_sheet.mm',
       'browser/ui/file_dialog.h',
index 93ad1ff19dce26a919c01f5243907b7a9779693b..481419c695332f4fad70bd61aa5617ca66c4da73 100644 (file)
@@ -14,7 +14,7 @@
 #include "base/mac/scoped_nsobject.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/values.h"
-#import "browser/ui/atom_event_processing_window.h"
+#import "browser/ui/cocoa/event_processing_window.h"
 #include "brightray/browser/inspectable_web_contents.h"
 #include "brightray/browser/inspectable_web_contents_view.h"
 #include "common/draggable_region.h"
@@ -76,7 +76,7 @@ static const CGFloat kAtomWindowCornerRadius = 4.0;
 
 @end
 
-@interface AtomNSWindow : AtomEventProcessingWindow {
+@interface AtomNSWindow : EventProcessingWindow {
  @protected
   atom::NativeWindowMac* shell_;
 }
@@ -440,9 +440,9 @@ void NativeWindowMac::HandleKeyboardEvent(
       event.type == content::NativeWebKeyboardEvent::Char)
     return;
 
-  AtomEventProcessingWindow* event_window =
-      static_cast<AtomEventProcessingWindow*>(window());
-  DCHECK([event_window isKindOfClass:[AtomEventProcessingWindow class]]);
+  EventProcessingWindow* event_window =
+      static_cast<EventProcessingWindow*>(window());
+  DCHECK([event_window isKindOfClass:[EventProcessingWindow class]]);
   [event_window redispatchKeyEvent:event.os_event];
 }
 
similarity index 79%
rename from browser/ui/atom_event_processing_window.h
rename to browser/ui/cocoa/event_processing_window.h
index 92a24712468c2a5ec1ba8039038f7f0944dd3f57..00872a39e501373e1b62770b9b02b92f0c0e2935 100644 (file)
@@ -2,15 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_
-#define ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_
+#ifndef ATOM_BROWSER_UI_COCOA_EVENT_PROCESSING_WINDOW_H_
+#define ATOM_BROWSER_UI_COCOA_EVENT_PROCESSING_WINDOW_H_
 
 #import <Cocoa/Cocoa.h>
 
 // Override NSWindow to access unhandled keyboard events (for command
 // processing); subclassing NSWindow is the only method to do
 // this.
-@interface AtomEventProcessingWindow : NSWindow {
+@interface EventProcessingWindow : NSWindow {
  @private
   BOOL redispatchingEvent_;
   BOOL eventHandled_;
@@ -27,4 +27,4 @@
 - (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
 @end
 
-#endif  // ATOM_BROWSER_UI_ATOM_EVENT_PROCESSING_WINDOW_H_
+#endif  // ATOM_BROWSER_UI_COCOA_EVENT_PROCESSING_WINDOW_H_
similarity index 95%
rename from browser/ui/atom_event_processing_window.mm
rename to browser/ui/cocoa/event_processing_window.mm
index ec287fbba9d1349e85a58930eb5caac868be4e0d..ce6e9b2f35ae4c448021b534f5482ce11e0e7d9e 100644 (file)
@@ -2,17 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "browser/ui/atom_event_processing_window.h"
+#import "browser/ui/cocoa/event_processing_window.h"
 
 #include "base/logging.h"
 #import "content/public/browser/render_widget_host_view_mac_base.h"
 
-@interface AtomEventProcessingWindow ()
+@interface EventProcessingWindow ()
 // Duplicate the given key event, but changing the associated window.
 - (NSEvent*)keyEventForWindow:(NSWindow*)window fromKeyEvent:(NSEvent*)event;
 @end
 
-@implementation AtomEventProcessingWindow
+@implementation EventProcessingWindow
 
 - (BOOL)redispatchKeyEvent:(NSEvent*)event {
   DCHECK(event);
   return NO;
 }
 
-@end  // AtomEventProcessingWindow
+@end  // EventProcessingWindow