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_types.h" |
| 10 #include "ui/gfx/x/x11_types.h" |
| 11 |
| 12 namespace views { |
| 13 |
| 14 // Wrapper for an X11 window which grabs mouse events whenever a |
| 15 // DesktopWindowTreeHostX11 gains capture. |
| 16 class X11CaptureWindow { |
| 17 public: |
| 18 X11CaptureWindow(); |
| 19 ~X11CaptureWindow(); |
| 20 |
| 21 XID xwindow() { |
| 22 return xwindow_; |
| 23 } |
| 24 |
| 25 // Whether |event| should be dispatched to the X11CaptureWindow's owner. |
| 26 bool CanDispatchEventToOwner(const ui::PlatformEvent& event); |
| 27 |
| 28 private: |
| 29 bool captured_; |
| 30 XID xwindow_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(X11CaptureWindow); |
| 33 }; |
| 34 |
| 35 } // namespace views |
| 36 |
| 37 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_ |
OLD | NEW |