• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_
6 #define UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_
7 
8 #import <Cocoa/Cocoa.h>
9 
10 namespace views {
11 class NativeWidgetMac;
12 class BridgedNativeWidget;
13 }
14 
15 // The delegate set on the NSWindow when a views::BridgedNativeWidget is
16 // initialized.
17 @interface ViewsNSWindowDelegate : NSObject<NSWindowDelegate> {
18  @private
19   views::BridgedNativeWidget* parent_;  // Weak. Owns this.
20 }
21 
22 // The NativeWidgetMac that created the window this is attached to. Returns
23 // NULL if not created by NativeWidgetMac.
24 @property(nonatomic, readonly) views::NativeWidgetMac* nativeWidgetMac;
25 
26 // Initialize with the given |parent|.
27 - (id)initWithBridgedNativeWidget:(views::BridgedNativeWidget*)parent;
28 
29 @end
30 
31 #endif  // UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_
32