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.
5 #ifndef UI_AURA_ROOT_WINDOW_MAC_H_
6 #define UI_AURA_ROOT_WINDOW_MAC_H_
8 #import <Cocoa/Cocoa.h>
11 class RootWindowHostMacDelegate
;
14 // RootWindow routes NSWindow events back to the RootWindowHost for dispatch
15 // to the Aura event handling system.
16 @interface RootWindowMac
: NSWindow
{
18 // Weak. May be NULL. The host delegate acts as a conduit for event routing
20 aura::RootWindowHostMacDelegate
* hostDelegate_
;
23 // Designated initializer.
24 - (id
)initWithContentRect
:(NSRect
)contentRect
25 styleMask
:(NSUInteger
)windowStyle
26 backing
:(NSBackingStoreType
)bufferingType
27 defer
:(BOOL
)deferCreation
;
29 // Sets the |hostDelegate_|
30 - (void)setHostDelegate
:(aura::RootWindowHostMacDelegate
*)hostDelegate
;
32 // Overrides main event dispatch to route NSWindow events to host delegate.
33 - (void)sendEvent
:(NSEvent
*)event
;
37 #endif // UI_AURA_ROOT_WINDOW_MAC_H_