Chromium Code Reviews| 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 "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 29 matching lines...) Expand all Loading... | |
| 40 // Deletes |bridge_| and informs |delegate_| that the native widget is | 40 // Deletes |bridge_| and informs |delegate_| that the native widget is |
| 41 // destroyed. | 41 // destroyed. |
| 42 // This is usually called from the NSWindowDelegate. A derived class can | 42 // This is usually called from the NSWindowDelegate. A derived class can |
| 43 // override this method for an early hook into the native window teardown. | 43 // override this method for an early hook into the native window teardown. |
| 44 virtual void OnWindowWillClose(); | 44 virtual void OnWindowWillClose(); |
| 45 | 45 |
| 46 // Returns the vertical position that sheets should be anchored, in pixels | 46 // Returns the vertical position that sheets should be anchored, in pixels |
| 47 // from the bottom of the window. | 47 // from the bottom of the window. |
| 48 virtual int SheetPositionY(); | 48 virtual int SheetPositionY(); |
| 49 | 49 |
| 50 // Returns the actual frame as the WindowServer sees it. | |
| 51 gfx::Rect WindowServerFrame() const; | |
|
tapted
2016/04/13 08:28:13
Can this go on BridgedNativeWidget instead?
It's
themblsha
2016/04/18 09:30:02
Well, I moved it to BridgedNativeWidget, as it use
| |
| 52 | |
| 50 // internal::NativeWidgetPrivate: | 53 // internal::NativeWidgetPrivate: |
| 51 void InitNativeWidget(const Widget::InitParams& params) override; | 54 void InitNativeWidget(const Widget::InitParams& params) override; |
| 52 void OnWidgetInitDone() override; | 55 void OnWidgetInitDone() override; |
| 53 NonClientFrameView* CreateNonClientFrameView() override; | 56 NonClientFrameView* CreateNonClientFrameView() override; |
| 54 bool ShouldUseNativeFrame() const override; | 57 bool ShouldUseNativeFrame() const override; |
| 55 bool ShouldWindowContentsBeTransparent() const override; | 58 bool ShouldWindowContentsBeTransparent() const override; |
| 56 void FrameTypeChanged() override; | 59 void FrameTypeChanged() override; |
| 57 Widget* GetWidget() override; | 60 Widget* GetWidget() override; |
| 58 const Widget* GetWidget() const override; | 61 const Widget* GetWidget() const override; |
| 59 gfx::NativeView GetNativeView() const override; | 62 gfx::NativeView GetNativeView() const override; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 scoped_ptr<BridgedNativeWidget> bridge_; | 152 scoped_ptr<BridgedNativeWidget> bridge_; |
| 150 | 153 |
| 151 Widget::InitParams::Ownership ownership_; | 154 Widget::InitParams::Ownership ownership_; |
| 152 | 155 |
| 153 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); | 156 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 } // namespace views | 159 } // namespace views |
| 157 | 160 |
| 158 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ | 161 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ |
| OLD | NEW |