| 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 15 matching lines...) Expand all Loading... |
| 26 namespace ui { | 26 namespace ui { |
| 27 class MouseEvent; | 27 class MouseEvent; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace aura { | 30 namespace aura { |
| 31 | 31 |
| 32 namespace internal { | 32 namespace internal { |
| 33 class TouchEventCalibrate; | 33 class TouchEventCalibrate; |
| 34 } | 34 } |
| 35 | 35 |
| 36 class AURA_EXPORT RootWindowHostX11 : public RootWindowHost, | 36 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, |
| 37 public base::MessageLoop::Dispatcher, | 37 public base::MessageLoop::Dispatcher, |
| 38 public ui::EventSource, | 38 public ui::EventSource, |
| 39 public EnvObserver { | 39 public EnvObserver { |
| 40 public: | 40 public: |
| 41 explicit RootWindowHostX11(const gfx::Rect& bounds); | 41 explicit WindowTreeHostX11(const gfx::Rect& bounds); |
| 42 virtual ~RootWindowHostX11(); | 42 virtual ~WindowTreeHostX11(); |
| 43 | 43 |
| 44 // Overridden from Dispatcher overrides: | 44 // Overridden from Dispatcher overrides: |
| 45 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 45 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
| 46 | 46 |
| 47 // RootWindowHost Overrides. | 47 // WindowTreeHost Overrides. |
| 48 virtual RootWindow* GetRootWindow() OVERRIDE; | 48 virtual RootWindow* GetRootWindow() OVERRIDE; |
| 49 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 49 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 50 virtual void Show() OVERRIDE; | 50 virtual void Show() OVERRIDE; |
| 51 virtual void Hide() OVERRIDE; | 51 virtual void Hide() OVERRIDE; |
| 52 virtual void ToggleFullScreen() OVERRIDE; | 52 virtual void ToggleFullScreen() OVERRIDE; |
| 53 virtual gfx::Rect GetBounds() const OVERRIDE; | 53 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 54 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 54 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 55 virtual gfx::Insets GetInsets() const OVERRIDE; | 55 virtual gfx::Insets GetInsets() const OVERRIDE; |
| 56 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | 56 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
| 57 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 57 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 87 // Returns true if there's an X window manager present... in most cases. Some | 87 // Returns true if there's an X window manager present... in most cases. Some |
| 88 // window managers (notably, ion3) don't implement enough of ICCCM for us to | 88 // window managers (notably, ion3) don't implement enough of ICCCM for us to |
| 89 // detect that they're there. | 89 // detect that they're there. |
| 90 bool IsWindowManagerPresent(); | 90 bool IsWindowManagerPresent(); |
| 91 | 91 |
| 92 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update | 92 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update |
| 93 // |current_cursor_|. | 93 // |current_cursor_|. |
| 94 void SetCursorInternal(gfx::NativeCursor cursor); | 94 void SetCursorInternal(gfx::NativeCursor cursor); |
| 95 | 95 |
| 96 // Translates the native mouse location into screen coordinates and and | 96 // Translates the native mouse location into screen coordinates and and |
| 97 // dispatches the event to RootWindowHostDelegate. | 97 // dispatches the event to WindowTreeHostDelegate. |
| 98 void TranslateAndDispatchMouseEvent(ui::MouseEvent* event); | 98 void TranslateAndDispatchMouseEvent(ui::MouseEvent* event); |
| 99 | 99 |
| 100 // Update is_internal_display_ based on delegate_ state | 100 // Update is_internal_display_ based on delegate_ state |
| 101 void UpdateIsInternalDisplay(); | 101 void UpdateIsInternalDisplay(); |
| 102 | 102 |
| 103 // Set the CrOS touchpad "tap paused" property. It is used to temporarily | 103 // Set the CrOS touchpad "tap paused" property. It is used to temporarily |
| 104 // turn off the Tap-to-click feature when the mouse pointer is invisible. | 104 // turn off the Tap-to-click feature when the mouse pointer is invisible. |
| 105 void SetCrOSTapPaused(bool state); | 105 void SetCrOSTapPaused(bool state); |
| 106 | 106 |
| 107 // The display and the native X window hosting the root window. | 107 // The display and the native X window hosting the root window. |
| (...skipping 22 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(RootWindowHostX11); | 140 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostX11); |
| 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 RootWindowHostX11. | 146 // create a X window for WindowTreeHostX11. |
| 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 |