| 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_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 Loading... |
| 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, relative to |
| 40 // the top 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 Loading... |
| 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_ |
| OLD | NEW |