| 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_LINUX_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 | 10 |
| 11 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 11 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
| 12 #undef RootWindow | 12 #undef RootWindow |
| 13 | 13 |
| 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 15 #include "ui/aura/root_window_host.h" | 16 #include "ui/aura/root_window_host.h" |
| 16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 17 | 18 |
| 18 namespace aura { | 19 namespace aura { |
| 19 | 20 |
| 20 class RootWindowHostLinux : public RootWindowHost { | 21 class RootWindowHostLinux : public RootWindowHost, |
| 22 public MessageLoop::Dispatcher { |
| 21 public: | 23 public: |
| 22 explicit RootWindowHostLinux(const gfx::Rect& bounds); | 24 explicit RootWindowHostLinux(const gfx::Rect& bounds); |
| 23 virtual ~RootWindowHostLinux(); | 25 virtual ~RootWindowHostLinux(); |
| 24 | 26 |
| 25 // Handles an event targeted at this host's window. | 27 // Overridden from Dispatcher overrides: |
| 26 base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev); | 28 virtual base::MessagePumpDispatcher::DispatchStatus |
| 29 Dispatch(XEvent* xev) OVERRIDE; |
| 27 | 30 |
| 28 private: | 31 private: |
| 29 // RootWindowHost Overrides. | 32 // RootWindowHost Overrides. |
| 30 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; | 33 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; |
| 31 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 34 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 32 virtual void Show() OVERRIDE; | 35 virtual void Show() OVERRIDE; |
| 33 virtual void ToggleFullScreen() OVERRIDE; | 36 virtual void ToggleFullScreen() OVERRIDE; |
| 34 virtual gfx::Rect GetBounds() const OVERRIDE; | 37 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 35 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 38 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 36 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 39 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 74 |
| 72 // The invisible cursor. | 75 // The invisible cursor. |
| 73 ::Cursor invisible_cursor_; | 76 ::Cursor invisible_cursor_; |
| 74 | 77 |
| 75 // The bounds of |xwindow_|. | 78 // The bounds of |xwindow_|. |
| 76 gfx::Rect bounds_; | 79 gfx::Rect bounds_; |
| 77 | 80 |
| 78 // True if the window should be focused when the window is shown. | 81 // True if the window should be focused when the window is shown. |
| 79 bool focus_when_shown_; | 82 bool focus_when_shown_; |
| 80 | 83 |
| 84 scoped_array<XID> pointer_barriers_; |
| 85 |
| 81 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); | 86 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); |
| 82 }; | 87 }; |
| 83 | 88 |
| 84 } // namespace aura | 89 } // namespace aura |
| 85 | 90 |
| 86 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ | 91 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ |
| OLD | NEW |