OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "ui/display/display_change_notifier.h" | 14 #include "ui/display/display_change_notifier.h" |
15 #include "ui/display/screen.h" | 15 #include "ui/display/screen.h" |
16 #include "ui/events/platform/platform_event_dispatcher.h" | 16 #include "ui/events/platform/platform_event_dispatcher.h" |
17 #include "ui/gfx/geometry/point.h" | |
17 #include "ui/gfx/x/x11_atom_cache.h" | 18 #include "ui/gfx/x/x11_atom_cache.h" |
18 #include "ui/views/views_export.h" | 19 #include "ui/views/views_export.h" |
19 | 20 |
20 typedef unsigned long XID; | 21 typedef unsigned long XID; |
21 typedef XID Window; | 22 typedef XID Window; |
22 typedef struct _XDisplay Display; | 23 typedef struct _XDisplay Display; |
23 | 24 |
24 namespace views { | 25 namespace views { |
25 class DesktopScreenX11Test; | 26 class DesktopScreenX11Test; |
26 | 27 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 // Dispatch(). | 96 // Dispatch(). |
96 std::unique_ptr<base::OneShotTimer> configure_timer_; | 97 std::unique_ptr<base::OneShotTimer> configure_timer_; |
97 | 98 |
98 display::DisplayChangeNotifier change_notifier_; | 99 display::DisplayChangeNotifier change_notifier_; |
99 | 100 |
100 ui::X11AtomCache atom_cache_; | 101 ui::X11AtomCache atom_cache_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); | 103 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); |
103 }; | 104 }; |
104 | 105 |
106 class VIEWS_EXPORT TestDesktopScreenX11 : public DesktopScreenX11 { | |
sky
2016/09/08 23:41:24
Document what this class does and why it's needed.
Tom (Use chromium acct)
2016/09/09 01:14:11
Done.
| |
107 public: | |
108 TestDesktopScreenX11(); | |
109 ~TestDesktopScreenX11() override; | |
110 | |
111 gfx::Point GetCursorScreenPoint() override; | |
112 void SetCursorScreenPoint(const gfx::Point& point); | |
113 | |
114 private: | |
115 gfx::Point cursor_screen_point_; | |
116 | |
117 DISALLOW_COPY_AND_ASSIGN(TestDesktopScreenX11); | |
118 }; | |
119 | |
120 VIEWS_EXPORT TestDesktopScreenX11* GetTestDesktopScreenX11(); | |
121 | |
105 } // namespace views | 122 } // namespace views |
106 | 123 |
107 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 124 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
OLD | NEW |