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

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

Issue 1315043003: [MacViews] Position modal sheets using ModalDialogHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bbobserver
Patch Set: Missded a comment nit. Created 5 years, 3 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/views_nswindow_delegate.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 "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/views/widget/native_widget_private.h" 9 #include "ui/views/widget/native_widget_private.h"
10 10
(...skipping 18 matching lines...) Expand all
29 // Return true if the delegate's modal type is window-modal. These display as 29 // Return true if the delegate's modal type is window-modal. These display as
30 // a native window "sheet", and have a different lifetime to regular windows. 30 // a native window "sheet", and have a different lifetime to regular windows.
31 bool IsWindowModalSheet() const; 31 bool IsWindowModalSheet() const;
32 32
33 // Deletes |bridge_| and informs |delegate_| that the native widget is 33 // Deletes |bridge_| and informs |delegate_| that the native widget is
34 // destroyed. 34 // destroyed.
35 // This is usually called from the NSWindowDelegate. A derived class can 35 // This is usually called from the NSWindowDelegate. A derived class can
36 // override this method for an early hook into the native window teardown. 36 // override this method for an early hook into the native window teardown.
37 virtual void OnWindowWillClose(); 37 virtual void OnWindowWillClose();
38 38
39 // Returns the vertical position that sheets should be anchored, in pixels
40 // from the bottom of the window.
41 virtual int SheetPositionY();
42
39 // internal::NativeWidgetPrivate: 43 // internal::NativeWidgetPrivate:
40 void InitNativeWidget(const Widget::InitParams& params) override; 44 void InitNativeWidget(const Widget::InitParams& params) override;
41 NonClientFrameView* CreateNonClientFrameView() override; 45 NonClientFrameView* CreateNonClientFrameView() override;
42 bool ShouldUseNativeFrame() const override; 46 bool ShouldUseNativeFrame() const override;
43 bool ShouldWindowContentsBeTransparent() const override; 47 bool ShouldWindowContentsBeTransparent() const override;
44 void FrameTypeChanged() override; 48 void FrameTypeChanged() override;
45 Widget* GetWidget() override; 49 Widget* GetWidget() override;
46 const Widget* GetWidget() const override; 50 const Widget* GetWidget() const override;
47 gfx::NativeView GetNativeView() const override; 51 gfx::NativeView GetNativeView() const override;
48 gfx::NativeWindow GetNativeWindow() const override; 52 gfx::NativeWindow GetNativeWindow() const override;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 scoped_ptr<BridgedNativeWidget> bridge_; 141 scoped_ptr<BridgedNativeWidget> bridge_;
138 142
139 Widget::InitParams::Ownership ownership_; 143 Widget::InitParams::Ownership ownership_;
140 144
141 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); 145 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac);
142 }; 146 };
143 147
144 } // namespace views 148 } // namespace views
145 149
146 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ 150 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_
OLDNEW
« no previous file with comments | « ui/views/cocoa/views_nswindow_delegate.mm ('k') | ui/views/widget/native_widget_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698