Index: ui/views/cocoa/bridged_native_widget.h |
diff --git a/ui/views/cocoa/bridged_native_widget.h b/ui/views/cocoa/bridged_native_widget.h |
index ba4c5847c735b1b578388f5291367c34e34896fc..eb723f1e76e79f9751491d713957c83722fa2ac9 100644 |
--- a/ui/views/cocoa/bridged_native_widget.h |
+++ b/ui/views/cocoa/bridged_native_widget.h |
@@ -95,6 +95,8 @@ class VIEWS_EXPORT BridgedNativeWidget |
// descendant windows where necessary. |
void SetVisibilityState(WindowVisibilityState new_state); |
+ void CloseAsynchronously(); |
+ |
// Acquiring mouse capture first steals capture from any existing |
// CocoaMouseCaptureDelegate, then captures all mouse events until released. |
void AcquireCapture(); |
@@ -227,6 +229,11 @@ class VIEWS_EXPORT BridgedNativeWidget |
// frame is ready, or a timeout occurs. |
void MaybeWaitForFrame(const gfx::Size& size_in_dip); |
+ // Return true if the Widget delegate's modal type is window-modal. These |
+ // display as a native window "sheet", and have a different lifetime to |
+ // regular windows. |
+ bool IsWindowModalSheet() const; |
+ |
// Show the window using -[NSApp beginSheet:..], modal for the parent window. |
void ShowAsModalSheet(); |
@@ -311,6 +318,11 @@ class VIEWS_EXPORT BridgedNativeWidget |
// shadow needs to be invalidated when a frame is received for the new shape. |
bool invalidate_shadow_on_frame_swap_ = false; |
+ // Set when an asynchronous close is pending. Visibility changes should be |
+ // suppressed in this case. For a synchronous close (e.g. via -[NSWindow |
+ // close]), the NSWindowDelegate is just set to nil. |
+ bool close_pending_ = false; |
+ |
AssociatedViews associated_views_; |
DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |