OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AURA_WINDOW_TREE_HOST_X11_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_X11_H_ |
6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
11 #include "ui/events/event_source.h" | 11 #include "ui/events/event_source.h" |
12 #include "ui/events/platform/platform_event_dispatcher.h" | 12 #include "ui/events/platform/platform_event_dispatcher.h" |
13 #include "ui/gfx/insets.h" | 13 #include "ui/gfx/insets.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 #include "ui/gfx/x/x11_atom_cache.h" | 15 #include "ui/gfx/x/x11_atom_cache.h" |
16 | 16 |
17 // X forward decls to avoid including Xlib.h in a header file. | 17 // X forward decls to avoid including Xlib.h in a header file. |
18 typedef struct _XDisplay XDisplay; | 18 typedef struct _XDisplay XDisplay; |
19 typedef unsigned long XID; | 19 typedef unsigned long XID; |
20 typedef XID Window; | 20 typedef XID Window; |
21 | 21 |
22 namespace ui { | 22 namespace ui { |
| 23 class ContextFactory; |
23 class MouseEvent; | 24 class MouseEvent; |
24 } | 25 } |
25 | 26 |
26 namespace aura { | 27 namespace aura { |
27 | 28 |
28 namespace internal { | 29 namespace internal { |
29 class TouchEventCalibrate; | 30 class TouchEventCalibrate; |
30 } | 31 } |
31 | 32 |
32 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, | 33 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, |
33 public ui::EventSource, | 34 public ui::EventSource, |
34 public ui::PlatformEventDispatcher { | 35 public ui::PlatformEventDispatcher { |
35 | 36 |
36 public: | 37 public: |
37 explicit WindowTreeHostX11(const gfx::Rect& bounds); | 38 WindowTreeHostX11(const gfx::Rect& bounds, |
| 39 ui::ContextFactory* context_factory); |
38 virtual ~WindowTreeHostX11(); | 40 virtual ~WindowTreeHostX11(); |
39 | 41 |
40 // ui::PlatformEventDispatcher: | 42 // ui::PlatformEventDispatcher: |
41 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 43 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
42 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 44 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
43 | 45 |
44 // WindowTreeHost: | 46 // WindowTreeHost: |
45 virtual ui::EventSource* GetEventSource() OVERRIDE; | 47 virtual ui::EventSource* GetEventSource() OVERRIDE; |
46 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 48 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
47 virtual void Show() OVERRIDE; | 49 virtual void Show() OVERRIDE; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 namespace test { | 111 namespace test { |
110 | 112 |
111 // Set the default value of the override redirect flag used to | 113 // Set the default value of the override redirect flag used to |
112 // create a X window for WindowTreeHostX11. | 114 // create a X window for WindowTreeHostX11. |
113 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); | 115 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); |
114 | 116 |
115 } // namespace test | 117 } // namespace test |
116 } // namespace aura | 118 } // namespace aura |
117 | 119 |
118 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ | 120 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ |
OLD | NEW |