| 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 25 matching lines...) Expand all Loading... |
| 36 public base::MessageLoop::Dispatcher, | 36 public base::MessageLoop::Dispatcher, |
| 37 public EnvObserver { | 37 public EnvObserver { |
| 38 public: | 38 public: |
| 39 explicit RootWindowHostX11(const gfx::Rect& bounds); | 39 explicit RootWindowHostX11(const gfx::Rect& bounds); |
| 40 virtual ~RootWindowHostX11(); | 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 // RootWindowHost Overrides. | 45 // RootWindowHost Overrides. |
| 46 virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE; | |
| 47 virtual RootWindow* GetRootWindow() OVERRIDE; | 46 virtual RootWindow* GetRootWindow() OVERRIDE; |
| 48 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 47 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 49 virtual void Show() OVERRIDE; | 48 virtual void Show() OVERRIDE; |
| 50 virtual void Hide() OVERRIDE; | 49 virtual void Hide() OVERRIDE; |
| 51 virtual void ToggleFullScreen() OVERRIDE; | 50 virtual void ToggleFullScreen() OVERRIDE; |
| 52 virtual gfx::Rect GetBounds() const OVERRIDE; | 51 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 53 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 52 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 54 virtual gfx::Insets GetInsets() const OVERRIDE; | 53 virtual gfx::Insets GetInsets() const OVERRIDE; |
| 55 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | 54 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
| 56 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 55 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
| 57 virtual void SetCapture() OVERRIDE; | 56 virtual void SetCapture() OVERRIDE; |
| 58 virtual void ReleaseCapture() OVERRIDE; | 57 virtual void ReleaseCapture() OVERRIDE; |
| 59 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; | 58 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; |
| 60 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; | 59 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; |
| 61 virtual bool ConfineCursorToRootWindow() OVERRIDE; | 60 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
| 62 virtual void UnConfineCursor() OVERRIDE; | 61 virtual void UnConfineCursor() OVERRIDE; |
| 63 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; | 62 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; |
| 64 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 63 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 65 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; | |
| 66 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; | 64 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; |
| 67 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 65 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 68 virtual void PrepareForShutdown() OVERRIDE; | 66 virtual void PrepareForShutdown() OVERRIDE; |
| 69 | 67 |
| 70 // EnvObserver overrides. | 68 // EnvObserver overrides. |
| 71 virtual void OnWindowInitialized(Window* window) OVERRIDE; | 69 virtual void OnWindowInitialized(Window* window) OVERRIDE; |
| 72 virtual void OnRootWindowInitialized(RootWindow* root_window) OVERRIDE; | 70 virtual void OnRootWindowInitialized(RootWindow* root_window) OVERRIDE; |
| 73 private: | 71 private: |
| 74 class MouseMoveFilter; | 72 class MouseMoveFilter; |
| 75 | 73 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 93 // dispatches the event to RootWindowHostDelegate. | 91 // dispatches the event to RootWindowHostDelegate. |
| 94 void TranslateAndDispatchMouseEvent(ui::MouseEvent* event); | 92 void TranslateAndDispatchMouseEvent(ui::MouseEvent* event); |
| 95 | 93 |
| 96 // Update is_internal_display_ based on delegate_ state | 94 // Update is_internal_display_ based on delegate_ state |
| 97 void UpdateIsInternalDisplay(); | 95 void UpdateIsInternalDisplay(); |
| 98 | 96 |
| 99 // 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 |
| 100 // 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. |
| 101 void SetCrOSTapPaused(bool state); | 99 void SetCrOSTapPaused(bool state); |
| 102 | 100 |
| 103 RootWindowHostDelegate* delegate_; | |
| 104 | |
| 105 // The display and the native X window hosting the root window. | 101 // The display and the native X window hosting the root window. |
| 106 XDisplay* xdisplay_; | 102 XDisplay* xdisplay_; |
| 107 ::Window xwindow_; | 103 ::Window xwindow_; |
| 108 | 104 |
| 109 // The native root window. | 105 // The native root window. |
| 110 ::Window x_root_window_; | 106 ::Window x_root_window_; |
| 111 | 107 |
| 112 // Current Aura cursor. | 108 // Current Aura cursor. |
| 113 gfx::NativeCursor current_cursor_; | 109 gfx::NativeCursor current_cursor_; |
| 114 | 110 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 namespace test { | 143 namespace test { |
| 148 | 144 |
| 149 // Set the default value of the override redirect flag used to | 145 // Set the default value of the override redirect flag used to |
| 150 // create a X window for RootWindowHostX11. | 146 // create a X window for RootWindowHostX11. |
| 151 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); | 147 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); |
| 152 | 148 |
| 153 } // namespace test | 149 } // namespace test |
| 154 } // namespace aura | 150 } // namespace aura |
| 155 | 151 |
| 156 #endif // UI_AURA_ROOT_WINDOW_HOST_X11_H_ | 152 #endif // UI_AURA_ROOT_WINDOW_HOST_X11_H_ |
| OLD | NEW |