Home | History | Annotate | Download | only in aura
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef UI_AURA_ROOT_WINDOW_MAC_H_
      6 #define UI_AURA_ROOT_WINDOW_MAC_H_
      7 
      8 #import <Cocoa/Cocoa.h>
      9 
     10 namespace aura {
     11 class RootWindowHostMacDelegate;
     12 }  // aura
     13 
     14 // RootWindow routes NSWindow events back to the RootWindowHost for dispatch
     15 // to the Aura event handling system.
     16 @interface RootWindowMac : NSWindow {
     17  @private
     18   // Weak.  May be NULL.  The host delegate acts as a conduit for event routing
     19   // back to the host.
     20   aura::RootWindowHostMacDelegate* hostDelegate_;
     21 }
     22 
     23 // Designated initializer.
     24 - (id)initWithContentRect:(NSRect)contentRect
     25                 styleMask:(NSUInteger)windowStyle
     26                   backing:(NSBackingStoreType)bufferingType
     27                     defer:(BOOL)deferCreation;
     28 
     29 // Sets the |hostDelegate_|
     30 - (void)setHostDelegate:(aura::RootWindowHostMacDelegate*)hostDelegate;
     31 
     32 // Overrides main event dispatch to route NSWindow events to host delegate.
     33 - (void)sendEvent:(NSEvent*)event;
     34 
     35 @end
     36 
     37 #endif  // UI_AURA_ROOT_WINDOW_MAC_H_
     38