Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_ | 5 #ifndef UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_ |
| 6 #define UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_ | 6 #define UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| 11 #include "ui/views/views_export.h" | |
| 11 | 12 |
| 12 namespace views { | 13 namespace views { |
| 13 class NativeWidgetMac; | 14 class NativeWidgetMac; |
| 14 class BridgedNativeWidget; | 15 class BridgedNativeWidget; |
| 15 } | 16 } |
| 16 | 17 |
| 17 // The delegate set on the NSWindow when a views::BridgedNativeWidget is | 18 // The delegate set on the NSWindow when a views::BridgedNativeWidget is |
| 18 // initialized. | 19 // initialized. |
| 20 VIEWS_EXPORT | |
|
erikchen
2015/05/19 00:35:24
This is necessary when I do a component build.
| |
| 19 @interface ViewsNSWindowDelegate : NSObject<NSWindowDelegate> { | 21 @interface ViewsNSWindowDelegate : NSObject<NSWindowDelegate> { |
| 20 @private | 22 @private |
| 21 views::BridgedNativeWidget* parent_; // Weak. Owns this. | 23 views::BridgedNativeWidget* parent_; // Weak. Owns this. |
| 22 base::scoped_nsobject<NSCursor> cursor_; | 24 base::scoped_nsobject<NSCursor> cursor_; |
| 23 } | 25 } |
| 24 | 26 |
| 25 // The NativeWidgetMac that created the window this is attached to. Returns | 27 // The NativeWidgetMac that created the window this is attached to. Returns |
| 26 // NULL if not created by NativeWidgetMac. | 28 // NULL if not created by NativeWidgetMac. |
| 27 @property(nonatomic, readonly) views::NativeWidgetMac* nativeWidgetMac; | 29 @property(nonatomic, readonly) views::NativeWidgetMac* nativeWidgetMac; |
| 28 | 30 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 45 - (void)onWindowOrderChanged:(NSNotification*)notification; | 47 - (void)onWindowOrderChanged:(NSNotification*)notification; |
| 46 | 48 |
| 47 // Notify when -[NSWindow display] is being called on the window. | 49 // Notify when -[NSWindow display] is being called on the window. |
| 48 - (void)onWindowWillDisplay; | 50 - (void)onWindowWillDisplay; |
| 49 | 51 |
| 50 // Called on the delegate of a modal sheet when its modal session ends. | 52 // Called on the delegate of a modal sheet when its modal session ends. |
| 51 - (void)sheetDidEnd:(NSWindow*)sheet | 53 - (void)sheetDidEnd:(NSWindow*)sheet |
| 52 returnCode:(NSInteger)returnCode | 54 returnCode:(NSInteger)returnCode |
| 53 contextInfo:(void*)contextInfo; | 55 contextInfo:(void*)contextInfo; |
| 54 | 56 |
| 57 // Redeclare methods defined in the protocol NSWindowDelegate which are only | |
| 58 // available on OSX 10.7+. | |
| 59 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window; | |
| 60 - (void)windowDidFailToExitFullScreen:(NSWindow*)window; | |
| 61 | |
| 55 @end | 62 @end |
| 56 | 63 |
| 57 #endif // UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_ | 64 #endif // UI_VIEWS_COCOA_VIEWS_NSWINDOW_DELEGATE_H_ |
| OLD | NEW |