| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 void SetVisibilityAnimationDuration(const base::TimeDelta& duration) override; | 111 void SetVisibilityAnimationDuration(const base::TimeDelta& duration) override; |
| 112 void SetVisibilityAnimationTransition( | 112 void SetVisibilityAnimationTransition( |
| 113 Widget::VisibilityTransition transition) override; | 113 Widget::VisibilityTransition transition) override; |
| 114 ui::NativeTheme* GetNativeTheme() const override; | 114 ui::NativeTheme* GetNativeTheme() const override; |
| 115 void OnRootViewLayout() override; | 115 void OnRootViewLayout() override; |
| 116 bool IsTranslucentWindowOpacitySupported() const override; | 116 bool IsTranslucentWindowOpacitySupported() const override; |
| 117 void OnSizeConstraintsChanged() override; | 117 void OnSizeConstraintsChanged() override; |
| 118 void RepostNativeEvent(gfx::NativeEvent native_event) override; | 118 void RepostNativeEvent(gfx::NativeEvent native_event) override; |
| 119 | 119 |
| 120 protected: | 120 protected: |
| 121 // Creates the NSWindow that will be passed to the BridgedNativeWidget. |
| 122 // Called by InitNativeWidget. The return value will be autoreleased. |
| 123 virtual gfx::NativeWindow CreateNSWindow(const Widget::InitParams& params); |
| 124 |
| 121 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 125 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 122 | 126 |
| 123 private: | 127 private: |
| 124 friend class test::MockNativeWidgetMac; | 128 friend class test::MockNativeWidgetMac; |
| 125 | 129 |
| 126 internal::NativeWidgetDelegate* delegate_; | 130 internal::NativeWidgetDelegate* delegate_; |
| 127 scoped_ptr<BridgedNativeWidget> bridge_; | 131 scoped_ptr<BridgedNativeWidget> bridge_; |
| 128 | 132 |
| 129 Widget::InitParams::Ownership ownership_; | 133 Widget::InitParams::Ownership ownership_; |
| 130 | 134 |
| 131 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); | 135 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); |
| 132 }; | 136 }; |
| 133 | 137 |
| 134 } // namespace views | 138 } // namespace views |
| 135 | 139 |
| 136 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ | 140 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ |
| OLD | NEW |