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" |
11 | 11 |
12 #if defined(__OBJC__) | 12 #if defined(__OBJC__) |
13 @class NativeWidgetMacNSWindow; | 13 @class NativeWidgetMacNSWindow; |
14 #else | 14 #else |
15 class NativeWidgetMacNSWindow; | 15 class NativeWidgetMacNSWindow; |
16 #endif | 16 #endif |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 namespace test { | 19 namespace test { |
20 class HitTestNativeWidgetMac; | 20 class HitTestNativeWidgetMac; |
21 class MockNativeWidgetMac; | 21 class MockNativeWidgetMac; |
22 class DragDropTestNativeWidgetMac; | |
tapted
2016/05/24 08:06:02
nit: sort
spqchan
2016/05/26 01:56:55
Done.
| |
22 } | 23 } |
23 | 24 |
24 class BridgedNativeWidget; | 25 class BridgedNativeWidget; |
25 | 26 |
26 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { | 27 class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { |
27 public: | 28 public: |
28 NativeWidgetMac(internal::NativeWidgetDelegate* delegate); | 29 NativeWidgetMac(internal::NativeWidgetDelegate* delegate); |
29 ~NativeWidgetMac() override; | 30 ~NativeWidgetMac() override; |
30 | 31 |
31 // Retrieves the bridge associated with the given NSWindow. Returns null if | 32 // Retrieves the bridge associated with the given NSWindow. Returns null if |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 // Creates the NSWindow that will be passed to the BridgedNativeWidget. | 140 // Creates the NSWindow that will be passed to the BridgedNativeWidget. |
140 // Called by InitNativeWidget. The return value will be autoreleased. | 141 // Called by InitNativeWidget. The return value will be autoreleased. |
141 virtual NativeWidgetMacNSWindow* CreateNSWindow( | 142 virtual NativeWidgetMacNSWindow* CreateNSWindow( |
142 const Widget::InitParams& params); | 143 const Widget::InitParams& params); |
143 | 144 |
144 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 145 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
145 | 146 |
146 private: | 147 private: |
147 friend class test::MockNativeWidgetMac; | 148 friend class test::MockNativeWidgetMac; |
148 friend class test::HitTestNativeWidgetMac; | 149 friend class test::HitTestNativeWidgetMac; |
150 friend class test::DragDropTestNativeWidgetMac; | |
tapted
2016/05/24 08:06:02
nit: sort
spqchan
2016/05/26 01:56:55
Done.
| |
149 | 151 |
150 internal::NativeWidgetDelegate* delegate_; | 152 internal::NativeWidgetDelegate* delegate_; |
151 std::unique_ptr<BridgedNativeWidget> bridge_; | 153 std::unique_ptr<BridgedNativeWidget> bridge_; |
152 | 154 |
153 Widget::InitParams::Ownership ownership_; | 155 Widget::InitParams::Ownership ownership_; |
154 | 156 |
155 // Internal name. | 157 // Internal name. |
156 std::string name_; | 158 std::string name_; |
157 | 159 |
158 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); | 160 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMac); |
159 }; | 161 }; |
160 | 162 |
161 } // namespace views | 163 } // namespace views |
162 | 164 |
163 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ | 165 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_MAC_H_ |
OLD | NEW |