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/gfx/native_widget_types.h" | |
8 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
9 | 10 |
10 namespace ui { | |
11 class EventHandler; | |
12 } | |
13 | |
14 namespace views { | 11 namespace views { |
15 namespace internal { | 12 namespace internal { |
16 class NativeWidgetPrivate; | 13 class NativeWidgetPrivate; |
17 } | 14 } |
18 | 15 |
19 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
20 // NativeWidget interface | 17 // NativeWidget interface |
21 // | 18 // |
22 // An interface that serves as the public API base for the | 19 // An interface that serves as the public API base for the |
23 // internal::NativeWidget interface that Widget uses to communicate with a | 20 // internal::NativeWidget interface that Widget uses to communicate with a |
24 // backend-specific native widget implementation. This is the only component of | 21 // backend-specific native widget implementation. This is the only component of |
25 // this interface that is publicly visible, and exists solely for exposure via | 22 // this interface that is publicly visible, and exists solely for exposure via |
26 // Widget's native_widget() accessor, which code occasionally static_casts to | 23 // Widget's native_widget() accessor, which code occasionally static_casts to |
27 // a known implementation in platform-specific code. | 24 // a known implementation in platform-specific code. |
28 // | 25 // |
29 class VIEWS_EXPORT NativeWidget { | 26 class VIEWS_EXPORT NativeWidget { |
30 public: | 27 public: |
31 virtual ~NativeWidget() {} | 28 virtual ~NativeWidget() {} |
32 | 29 |
33 // Retrieves the event handler | 30 // Repost an unhandled event to the native widget for default OS processing. |
34 virtual ui::EventHandler* GetEventHandler() = 0; | 31 virtual void RepostNativeEvent(gfx::NativeEvent os_event) = 0; |
sadrul
2014/05/29 23:09:27
|os_event| may be confusing here, because in aura,
tapted
2014/05/30 01:59:44
Done.
| |
35 | 32 |
36 private: | 33 private: |
37 friend class Widget; | 34 friend class Widget; |
38 | 35 |
39 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() = 0; | 36 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() = 0; |
40 }; | 37 }; |
41 | 38 |
42 } // namespace views | 39 } // namespace views |
43 | 40 |
44 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ | 41 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_H_ |
OLD | NEW |