| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PLATFORM_WINDOW_X11_X11_WINDOW_H_ | 5 #ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_ |
| 6 #define UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_ | 6 #define UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/events/platform/platform_event_dispatcher.h" | 9 #include "ui/events/platform/platform_event_dispatcher.h" |
| 10 #include "ui/platform_window/x11/x11_window_base.h" | 10 #include "ui/platform_window/x11/x11_window_base.h" |
| 11 #include "ui/platform_window/x11/x11_window_export.h" | 11 #include "ui/platform_window/x11/x11_window_export.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 // PlatformWindow implementation for X11. PlatformEvents are XEvents. | 15 // PlatformWindow implementation for X11. PlatformEvents are XEvents. |
| 16 class X11_WINDOW_EXPORT X11Window : public X11WindowBase, | 16 class X11_WINDOW_EXPORT X11Window : public X11WindowBase, |
| 17 public PlatformEventDispatcher { | 17 public PlatformEventDispatcher { |
| 18 public: | 18 public: |
| 19 X11Window(PlatformWindowDelegate* delegate, const gfx::Rect& bounds); | 19 X11Window(PlatformWindowDelegate* delegate, const gfx::Rect& bounds); |
| 20 ~X11Window() override; | 20 ~X11Window() override; |
| 21 | 21 |
| 22 // PlatformWindow: | 22 // PlatformWindow: |
| 23 void PrepareForShutdown() override; |
| 23 void SetCursor(PlatformCursor cursor) override; | 24 void SetCursor(PlatformCursor cursor) override; |
| 24 | 25 |
| 25 private: | 26 private: |
| 26 void ProcessXInput2Event(XEvent* xev); | 27 void ProcessXInput2Event(XEvent* xev); |
| 27 | 28 |
| 28 // PlatformEventDispatcher: | 29 // PlatformEventDispatcher: |
| 29 bool CanDispatchEvent(const PlatformEvent& event) override; | 30 bool CanDispatchEvent(const PlatformEvent& event) override; |
| 30 uint32_t DispatchEvent(const PlatformEvent& event) override; | 31 uint32_t DispatchEvent(const PlatformEvent& event) override; |
| 31 | 32 |
| 32 DISALLOW_COPY_AND_ASSIGN(X11Window); | 33 DISALLOW_COPY_AND_ASSIGN(X11Window); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace ui | 36 } // namespace ui |
| 36 | 37 |
| 37 #endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_ | 38 #endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_ |
| OLD | NEW |