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

Side by Side Diff: ui/aura/window_tree_host_x11.h

Issue 219743002: x11: Move X event handling out of the message-pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r261267 Created 6 years, 8 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
« no previous file with comments | « mojo/services/native_viewport/native_viewport_x11.cc ('k') | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_WINDOW_TREE_HOST_X11_H_ 5 #ifndef UI_AURA_WINDOW_TREE_HOST_X11_H_
6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_ 6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 12 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
13 #undef RootWindow 13 #undef RootWindow
14 14
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/message_loop/message_pump_dispatcher.h"
17 #include "ui/aura/aura_export.h" 16 #include "ui/aura/aura_export.h"
18 #include "ui/aura/env_observer.h" 17 #include "ui/aura/env_observer.h"
19 #include "ui/aura/window_tree_host.h" 18 #include "ui/aura/window_tree_host.h"
20 #include "ui/base/x/x11_util.h" 19 #include "ui/base/x/x11_util.h"
21 #include "ui/events/event_source.h" 20 #include "ui/events/event_source.h"
21 #include "ui/events/platform/platform_event_dispatcher.h"
22 #include "ui/gfx/insets.h" 22 #include "ui/gfx/insets.h"
23 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
24 #include "ui/gfx/x/x11_atom_cache.h" 24 #include "ui/gfx/x/x11_atom_cache.h"
25 25
26 namespace ui { 26 namespace ui {
27 class MouseEvent; 27 class MouseEvent;
28 } 28 }
29 29
30 namespace aura { 30 namespace aura {
31 31
32 namespace internal { 32 namespace internal {
33 class TouchEventCalibrate; 33 class TouchEventCalibrate;
34 } 34 }
35 35
36 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, 36 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
37 public base::MessagePumpDispatcher,
38 public ui::EventSource, 37 public ui::EventSource,
38 public ui::PlatformEventDispatcher,
39 public EnvObserver { 39 public EnvObserver {
40 public: 40 public:
41 explicit WindowTreeHostX11(const gfx::Rect& bounds); 41 explicit WindowTreeHostX11(const gfx::Rect& bounds);
42 virtual ~WindowTreeHostX11(); 42 virtual ~WindowTreeHostX11();
43 43
44 // Overridden from Dispatcher overrides: 44 // ui::PlatformEventDispatcher:
45 virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; 45 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
46 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
46 47
47 // WindowTreeHost Overrides. 48 // WindowTreeHost:
48 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 49 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
49 virtual void Show() OVERRIDE; 50 virtual void Show() OVERRIDE;
50 virtual void Hide() OVERRIDE; 51 virtual void Hide() OVERRIDE;
51 virtual void ToggleFullScreen() OVERRIDE; 52 virtual void ToggleFullScreen() OVERRIDE;
52 virtual gfx::Rect GetBounds() const OVERRIDE; 53 virtual gfx::Rect GetBounds() const OVERRIDE;
53 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 54 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
54 virtual gfx::Insets GetInsets() const OVERRIDE; 55 virtual gfx::Insets GetInsets() const OVERRIDE;
55 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; 56 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
56 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 57 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
57 virtual void SetCapture() OVERRIDE; 58 virtual void SetCapture() OVERRIDE;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 namespace test { 133 namespace test {
133 134
134 // Set the default value of the override redirect flag used to 135 // Set the default value of the override redirect flag used to
135 // create a X window for WindowTreeHostX11. 136 // create a X window for WindowTreeHostX11.
136 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); 137 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect);
137 138
138 } // namespace test 139 } // namespace test
139 } // namespace aura 140 } // namespace aura
140 141
141 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ 142 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/native_viewport_x11.cc ('k') | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698