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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 126 |
126 protected: | 127 protected: |
127 // Creates the NSWindow that will be passed to the BridgedNativeWidget. | 128 // Creates the NSWindow that will be passed to the BridgedNativeWidget. |
128 // Called by InitNativeWidget. The return value will be autoreleased. | 129 // Called by InitNativeWidget. The return value will be autoreleased. |
129 virtual gfx::NativeWindow CreateNSWindow(const Widget::InitParams& params); | 130 virtual gfx::NativeWindow CreateNSWindow(const Widget::InitParams& params); |
130 | 131 |
131 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 132 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
132 | 133 |
133 private: | 134 private: |
134 friend class test::MockNativeWidgetMac; | 135 friend class test::MockNativeWidgetMac; |
| 136 friend class test::HitTestNativeWidgetMac; |
135 | 137 |
136 internal::NativeWidgetDelegate* delegate_; | 138 internal::NativeWidgetDelegate* delegate_; |
137 scoped_ptr<BridgedNativeWidget> bridge_; | 139 scoped_ptr<BridgedNativeWidget> bridge_; |
138 | 140 |
139 Widget::InitParams::Ownership ownership_; | 141 Widget::InitParams::Ownership ownership_; |
140 | 142 |
141 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); | 143 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); |
142 }; | 144 }; |
143 | 145 |
144 } // namespace views | 146 } // namespace views |
145 | 147 |
146 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ | 148 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ |
OLD | NEW |