OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ |
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ |
7 | 7 |
8 #include "ui/views/widget/widget.h" | 8 #include "ui/views/widget/widget.h" |
9 | 9 |
10 namespace ui { | |
11 class EventHandler; | |
12 } | |
13 | |
14 namespace views { | 10 namespace views { |
15 namespace internal { | 11 namespace internal { |
16 class NativeWidgetPrivate; | 12 class NativeWidgetPrivate; |
17 } | 13 } |
18 | 14 |
19 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
20 // NativeWidget interface | 16 // NativeWidget interface |
21 // | 17 // |
22 // An interface that serves as the public API base for the | 18 // An interface that serves as the public API base for the |
23 // internal::NativeWidget interface that Widget uses to communicate with a | 19 // internal::NativeWidget interface that Widget uses to communicate with a |
24 // backend-specific native widget implementation. This is the only component of | 20 // backend-specific native widget implementation. This is the only component of |
25 // this interface that is publicly visible, and exists solely for exposure via | 21 // this interface that is publicly visible, and exists solely for exposure via |
26 // Widget's native_widget() accessor, which code occasionally static_casts to | 22 // Widget's native_widget() accessor, which code occasionally static_casts to |
27 // a known implementation in platform-specific code. | 23 // a known implementation in platform-specific code. |
28 // | 24 // |
29 class VIEWS_EXPORT NativeWidget { | 25 class VIEWS_EXPORT NativeWidget { |
30 public: | 26 public: |
31 virtual ~NativeWidget() {} | 27 virtual ~NativeWidget() {} |
32 | 28 |
33 // Retrieves the event handler | |
34 virtual ui::EventHandler* GetEventHandler() = 0; | |
35 | |
36 private: | 29 private: |
37 friend class Widget; | 30 friend class Widget; |
38 | 31 |
39 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() = 0; | 32 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() = 0; |
40 }; | 33 }; |
41 | 34 |
42 } // namespace views | 35 } // namespace views |
43 | 36 |
44 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ | 37 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ |
OLD | NEW |