Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: ui/views/widget/native_widget_mac.h

Issue 2061693003: MacViews: Suppress visibility changes during an asynchronous close. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Neater, but Linux, Windows disagree on WidgetTest.DesktopNativeWidgetVisibilityAfterCloseTest Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WIDGET_NATIVE_WIDGET_MAC_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/widget/native_widget_private.h" 10 #include "ui/views/widget/native_widget_private.h"
(...skipping 15 matching lines...) Expand all
26 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { 26 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate {
27 public: 27 public:
28 explicit NativeWidgetMac(internal::NativeWidgetDelegate* delegate); 28 explicit NativeWidgetMac(internal::NativeWidgetDelegate* delegate);
29 ~NativeWidgetMac() override; 29 ~NativeWidgetMac() override;
30 30
31 // Retrieves the bridge associated with the given NSWindow. Returns null if 31 // Retrieves the bridge associated with the given NSWindow. Returns null if
32 // the supplied handle has no associated Widget. 32 // the supplied handle has no associated Widget.
33 static BridgedNativeWidget* GetBridgeForNativeWindow( 33 static BridgedNativeWidget* GetBridgeForNativeWindow(
34 gfx::NativeWindow window); 34 gfx::NativeWindow window);
35 35
36 // Return true if the delegate's modal type is window-modal. These display as
37 // a native window "sheet", and have a different lifetime to regular windows.
38 bool IsWindowModalSheet() const;
39
40 // Deletes |bridge_| and informs |delegate_| that the native widget is 36 // Deletes |bridge_| and informs |delegate_| that the native widget is
41 // destroyed. This is usually called from the NSWindowDelegate. 37 // destroyed. This is usually called from the NSWindowDelegate.
42 void OnWindowWillClose(); 38 void OnWindowWillClose();
43 39
44 // Returns the vertical position that sheets should be anchored, in pixels 40 // Returns the vertical position that sheets should be anchored, in pixels
45 // from the bottom of the window. 41 // from the bottom of the window.
46 virtual int SheetPositionY(); 42 virtual int SheetPositionY();
47 43
48 // internal::NativeWidgetPrivate: 44 // internal::NativeWidgetPrivate:
49 void InitNativeWidget(const Widget::InitParams& params) override; 45 void InitNativeWidget(const Widget::InitParams& params) override;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 149
154 // Internal name. 150 // Internal name.
155 std::string name_; 151 std::string name_;
156 152
157 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); 153 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac);
158 }; 154 };
159 155
160 } // namespace views 156 } // namespace views
161 157
162 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ 158 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
OLDNEW
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698