| 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 |
| 11 namespace views { | 11 namespace views { |
| 12 namespace test { | 12 namespace test { |
| 13 class HitTestNativeWidgetMac; |
| 13 class MockNativeWidgetMac; | 14 class MockNativeWidgetMac; |
| 14 } | 15 } |
| 15 | 16 |
| 16 class BridgedNativeWidget; | 17 class BridgedNativeWidget; |
| 17 | 18 |
| 18 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { | 19 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { |
| 19 public: | 20 public: |
| 20 NativeWidgetMac(internal::NativeWidgetDelegate* delegate); | 21 NativeWidgetMac(internal::NativeWidgetDelegate* delegate); |
| 21 ~NativeWidgetMac() override; | 22 ~NativeWidgetMac() override; |
| 22 | 23 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 protected: | 123 protected: |
| 123 // Creates the NSWindow that will be passed to the BridgedNativeWidget. | 124 // Creates the NSWindow that will be passed to the BridgedNativeWidget. |
| 124 // Called by InitNativeWidget. The return value will be autoreleased. | 125 // Called by InitNativeWidget. The return value will be autoreleased. |
| 125 virtual gfx::NativeWindow CreateNSWindow(const Widget::InitParams& params); | 126 virtual gfx::NativeWindow CreateNSWindow(const Widget::InitParams& params); |
| 126 | 127 |
| 127 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 128 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 128 | 129 |
| 129 private: | 130 private: |
| 130 friend class test::MockNativeWidgetMac; | 131 friend class test::MockNativeWidgetMac; |
| 132 friend class test::HitTestNativeWidgetMac; |
| 131 | 133 |
| 132 internal::NativeWidgetDelegate* delegate_; | 134 internal::NativeWidgetDelegate* delegate_; |
| 133 scoped_ptr<BridgedNativeWidget> bridge_; | 135 scoped_ptr<BridgedNativeWidget> bridge_; |
| 134 | 136 |
| 135 Widget::InitParams::Ownership ownership_; | 137 Widget::InitParams::Ownership ownership_; |
| 136 | 138 |
| 137 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); | 139 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); |
| 138 }; | 140 }; |
| 139 | 141 |
| 140 } // namespace views | 142 } // namespace views |
| 141 | 143 |
| 142 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ | 144 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ |
| OLD | NEW |