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_ROOT_WINDOW_HOST_X11_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_X11_H_ |
6 #define UI_AURA_ROOT_WINDOW_HOST_X11_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_X11_H_ |
7 | 7 |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace ui { | 25 namespace ui { |
26 class MouseEvent; | 26 class MouseEvent; |
27 } | 27 } |
28 | 28 |
29 namespace aura { | 29 namespace aura { |
30 | 30 |
31 namespace internal { | 31 namespace internal { |
32 class TouchEventCalibrate; | 32 class TouchEventCalibrate; |
33 } | 33 } |
34 | 34 |
35 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, | 35 class AURA_EXPORT RootWindowHostX11 : public RootWindowHost, |
36 public base::MessageLoop::Dispatcher, | 36 public base::MessageLoop::Dispatcher, |
37 public EnvObserver { | 37 public EnvObserver { |
38 public: | 38 public: |
39 explicit WindowTreeHostX11(const gfx::Rect& bounds); | 39 explicit RootWindowHostX11(const gfx::Rect& bounds); |
40 virtual ~WindowTreeHostX11(); | 40 virtual ~RootWindowHostX11(); |
41 | 41 |
42 // Overridden from Dispatcher overrides: | 42 // Overridden from Dispatcher overrides: |
43 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 43 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
44 | 44 |
45 // WindowTreeHost Overrides. | 45 // RootWindowHost Overrides. |
46 virtual RootWindow* GetRootWindow() OVERRIDE; | 46 virtual RootWindow* GetRootWindow() OVERRIDE; |
47 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 47 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
48 virtual void Show() OVERRIDE; | 48 virtual void Show() OVERRIDE; |
49 virtual void Hide() OVERRIDE; | 49 virtual void Hide() OVERRIDE; |
50 virtual void ToggleFullScreen() OVERRIDE; | 50 virtual void ToggleFullScreen() OVERRIDE; |
51 virtual gfx::Rect GetBounds() const OVERRIDE; | 51 virtual gfx::Rect GetBounds() const OVERRIDE; |
52 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 52 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
53 virtual gfx::Insets GetInsets() const OVERRIDE; | 53 virtual gfx::Insets GetInsets() const OVERRIDE; |
54 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | 54 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
55 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 55 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
(...skipping 25 matching lines...) Expand all Loading... |
81 // Returns true if there's an X window manager present... in most cases. Some | 81 // Returns true if there's an X window manager present... in most cases. Some |
82 // window managers (notably, ion3) don't implement enough of ICCCM for us to | 82 // window managers (notably, ion3) don't implement enough of ICCCM for us to |
83 // detect that they're there. | 83 // detect that they're there. |
84 bool IsWindowManagerPresent(); | 84 bool IsWindowManagerPresent(); |
85 | 85 |
86 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update | 86 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update |
87 // |current_cursor_|. | 87 // |current_cursor_|. |
88 void SetCursorInternal(gfx::NativeCursor cursor); | 88 void SetCursorInternal(gfx::NativeCursor cursor); |
89 | 89 |
90 // Translates the native mouse location into screen coordinates and and | 90 // Translates the native mouse location into screen coordinates and and |
91 // dispatches the event to WindowTreeHostDelegate. | 91 // dispatches the event to RootWindowHostDelegate. |
92 void TranslateAndDispatchMouseEvent(ui::MouseEvent* event); | 92 void TranslateAndDispatchMouseEvent(ui::MouseEvent* event); |
93 | 93 |
94 // Update is_internal_display_ based on delegate_ state | 94 // Update is_internal_display_ based on delegate_ state |
95 void UpdateIsInternalDisplay(); | 95 void UpdateIsInternalDisplay(); |
96 | 96 |
97 // Set the CrOS touchpad "tap paused" property. It is used to temporarily | 97 // Set the CrOS touchpad "tap paused" property. It is used to temporarily |
98 // turn off the Tap-to-click feature when the mouse pointer is invisible. | 98 // turn off the Tap-to-click feature when the mouse pointer is invisible. |
99 void SetCrOSTapPaused(bool state); | 99 void SetCrOSTapPaused(bool state); |
100 | 100 |
101 // The display and the native X window hosting the root window. | 101 // The display and the native X window hosting the root window. |
(...skipping 28 matching lines...) Expand all Loading... |
130 | 130 |
131 scoped_ptr<internal::TouchEventCalibrate> touch_calibrate_; | 131 scoped_ptr<internal::TouchEventCalibrate> touch_calibrate_; |
132 | 132 |
133 scoped_ptr<MouseMoveFilter> mouse_move_filter_; | 133 scoped_ptr<MouseMoveFilter> mouse_move_filter_; |
134 | 134 |
135 ui::X11AtomCache atom_cache_; | 135 ui::X11AtomCache atom_cache_; |
136 | 136 |
137 // Touch ids of which the touch press happens at side bezel region. | 137 // Touch ids of which the touch press happens at side bezel region. |
138 uint32 bezel_tracking_ids_; | 138 uint32 bezel_tracking_ids_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11); | 140 DISALLOW_COPY_AND_ASSIGN(RootWindowHostX11); |
141 }; | 141 }; |
142 | 142 |
143 namespace test { | 143 namespace test { |
144 | 144 |
145 // Set the default value of the override redirect flag used to | 145 // Set the default value of the override redirect flag used to |
146 // create a X window for WindowTreeHostX11. | 146 // create a X window for RootWindowHostX11. |
147 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); | 147 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); |
148 | 148 |
149 } // namespace test | 149 } // namespace test |
150 } // namespace aura | 150 } // namespace aura |
151 | 151 |
152 #endif // UI_AURA_ROOT_WINDOW_HOST_X11_H_ | 152 #endif // UI_AURA_ROOT_WINDOW_HOST_X11_H_ |
OLD | NEW |