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

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

Issue 2393843002: MacViews: Implement CloseNow() as just -[NSWindow close]. (Closed)
Patch Set: Respond to comments Created 4 years, 2 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/cocoa/bridged_native_widget_unittest.mm ('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 20 matching lines...) Expand all
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 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. 37 // a native window "sheet", and have a different lifetime to regular windows.
38 bool IsWindowModalSheet() const; 38 bool IsWindowModalSheet() const;
39 39
40 // Deletes |bridge_| and informs |delegate_| that the native widget is 40 // Deletes |bridge_| and informs |delegate_| that the native widget is
41 // destroyed. This is usually called from the NSWindowDelegate. 41 // destroyed. BridgedNativeWidget::OnWindowWillClose() calls this when the
42 void OnWindowWillClose(); 42 // NSWindowDelegate informs the bridge that the window is being closed.
43 void OnWindowDestroyed();
43 44
44 // Returns the vertical position that sheets should be anchored, in pixels 45 // Returns the vertical position that sheets should be anchored, in pixels
45 // from the bottom of the window. 46 // from the bottom of the window.
46 virtual int SheetPositionY(); 47 virtual int SheetPositionY();
47 48
48 // internal::NativeWidgetPrivate: 49 // internal::NativeWidgetPrivate:
49 void InitNativeWidget(const Widget::InitParams& params) override; 50 void InitNativeWidget(const Widget::InitParams& params) override;
50 void OnWidgetInitDone() override; 51 void OnWidgetInitDone() override;
51 NonClientFrameView* CreateNonClientFrameView() override; 52 NonClientFrameView* CreateNonClientFrameView() override;
52 bool ShouldUseNativeFrame() const override; 53 bool ShouldUseNativeFrame() const override;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 // Internal name. 154 // Internal name.
154 std::string name_; 155 std::string name_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); 157 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac);
157 }; 158 };
158 159
159 } // namespace views 160 } // namespace views
160 161
161 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ 162 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_native_widget_unittest.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698