OLD | NEW |
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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, | 32 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, |
33 public ui::EventSource, | 33 public ui::EventSource, |
34 public ui::PlatformEventDispatcher { | 34 public ui::PlatformEventDispatcher { |
35 | 35 |
36 public: | 36 public: |
37 explicit WindowTreeHostX11(const gfx::Rect& bounds); | 37 explicit WindowTreeHostX11(const gfx::Rect& bounds); |
38 virtual ~WindowTreeHostX11(); | 38 virtual ~WindowTreeHostX11(); |
39 | 39 |
40 // ui::PlatformEventDispatcher: | 40 // ui::PlatformEventDispatcher: |
41 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 41 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override; |
42 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 42 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override; |
43 | 43 |
44 // WindowTreeHost: | 44 // WindowTreeHost: |
45 virtual ui::EventSource* GetEventSource() OVERRIDE; | 45 virtual ui::EventSource* GetEventSource() override; |
46 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 46 virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; |
47 virtual void Show() OVERRIDE; | 47 virtual void Show() override; |
48 virtual void Hide() OVERRIDE; | 48 virtual void Hide() override; |
49 virtual gfx::Rect GetBounds() const OVERRIDE; | 49 virtual gfx::Rect GetBounds() const override; |
50 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 50 virtual void SetBounds(const gfx::Rect& bounds) override; |
51 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 51 virtual gfx::Point GetLocationOnNativeScreen() const override; |
52 virtual void SetCapture() OVERRIDE; | 52 virtual void SetCapture() override; |
53 virtual void ReleaseCapture() OVERRIDE; | 53 virtual void ReleaseCapture() override; |
54 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; | 54 virtual void PostNativeEvent(const base::NativeEvent& event) override; |
55 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE; | 55 virtual void SetCursorNative(gfx::NativeCursor cursor_type) override; |
56 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | 56 virtual void MoveCursorToNative(const gfx::Point& location) override; |
57 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | 57 virtual void OnCursorVisibilityChangedNative(bool show) override; |
58 | 58 |
59 // ui::EventSource overrides. | 59 // ui::EventSource overrides. |
60 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | 60 virtual ui::EventProcessor* GetEventProcessor() override; |
61 | 61 |
62 protected: | 62 protected: |
63 // Called when X Configure Notify event is recevied. | 63 // Called when X Configure Notify event is recevied. |
64 virtual void OnConfigureNotify(); | 64 virtual void OnConfigureNotify(); |
65 | 65 |
66 // Translates the native mouse location into screen coordinates and | 66 // Translates the native mouse location into screen coordinates and |
67 // dispatches the event via WindowEventDispatcher. | 67 // dispatches the event via WindowEventDispatcher. |
68 virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event); | 68 virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event); |
69 | 69 |
70 ::Window x_root_window() { return x_root_window_; } | 70 ::Window x_root_window() { return x_root_window_; } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 namespace test { | 108 namespace test { |
109 | 109 |
110 // Set the default value of the override redirect flag used to | 110 // Set the default value of the override redirect flag used to |
111 // create a X window for WindowTreeHostX11. | 111 // create a X window for WindowTreeHostX11. |
112 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); | 112 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); |
113 | 113 |
114 } // namespace test | 114 } // namespace test |
115 } // namespace aura | 115 } // namespace aura |
116 | 116 |
117 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ | 117 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ |
OLD | NEW |