Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: ui/views/widget/desktop_aura/x11_capture_window.h

Issue 380943003: Do not release capture when transferring capture between Chrome windows on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/x11_capture_window.h
diff --git a/ui/views/widget/desktop_aura/x11_capture_window.h b/ui/views/widget/desktop_aura/x11_capture_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..51e7bbf7d01188e57400844f37d0063c7b2699d9
--- /dev/null
+++ b/ui/views/widget/desktop_aura/x11_capture_window.h
@@ -0,0 +1,38 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_
+#define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_
+
+#include "base/basictypes.h"
+#include "ui/events/platform/platform_event_dispatcher.h"
+
+typedef unsigned long XID;
+
+namespace views {
+
+// Wrapper for an X11 window which grabs mouse events whenever a
+// DesktopWindowTreeHostX11 gains capture.
+class X11CaptureWindow : public ui::PlatformEventDispatcher {
+ public:
+ X11CaptureWindow();
+ virtual ~X11CaptureWindow();
+
+ XID xwindow() {
+ return xwindow_;
+ }
+
+ private:
+ virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+ virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
+
+ bool captured_;
+ XID xwindow_;
+
+ DISALLOW_COPY_AND_ASSIGN(X11CaptureWindow);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_CAPTURE_WINDOW_H_

Powered by Google App Engine
This is Rietveld 408576698