OLD | NEW |
| (Empty) |
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 #import "ui/aura/root_window_mac.h" | |
6 | |
7 #include "ui/aura/root_window_host_mac.h" | |
8 | |
9 @implementation RootWindowMac | |
10 | |
11 - (id)initWithContentRect:(NSRect)contentRect | |
12 styleMask:(NSUInteger)windowStyle | |
13 backing:(NSBackingStoreType)bufferingType | |
14 defer:(BOOL)deferCreation { | |
15 if ((self = [super initWithContentRect:contentRect | |
16 styleMask:windowStyle | |
17 backing:bufferingType | |
18 defer:deferCreation])) { | |
19 hostDelegate_ = NULL; | |
20 } | |
21 return self; | |
22 } | |
23 | |
24 - (void)setHostDelegate:(aura::RootWindowHostMacDelegate*)hostDelegate { | |
25 hostDelegate_ = hostDelegate; | |
26 } | |
27 | |
28 - (void)sendEvent:(NSEvent*)event { | |
29 // Allow both the Cocoa machinery and the Aura machinery to handle the event. | |
30 [super sendEvent:event]; | |
31 if (hostDelegate_) | |
32 hostDelegate_->SendEvent(event); | |
33 } | |
34 | |
35 @end | |
OLD | NEW |