OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "ui/events/platform/platform_event_dispatcher.h" |
| 10 |
| 11 typedef unsigned long XID; |
| 12 |
| 13 namespace views { |
| 14 |
| 15 // Wrapper for an X11 window which grabs mouse events whenever a |
| 16 // DesktopWindowTreeHostX11 gains capture. |
| 17 class X11CaptureWindow : public ui::PlatformEventDispatcher { |
| 18 public: |
| 19 X11CaptureWindow(); |
| 20 virtual ~X11CaptureWindow(); |
| 21 |
| 22 XID xwindow() { |
| 23 return xwindow_; |
| 24 } |
| 25 |
| 26 private: |
| 27 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
| 28 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
| 29 |
| 30 bool captured_; |
| 31 XID xwindow_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(X11CaptureWindow); |
| 34 }; |
| 35 |
| 36 } // namespace views |
| 37 |
| 38 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_ |
OLD | NEW |