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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698