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_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
7 | 7 |
8 #include <X11/extensions/shape.h> | 8 #include <X11/extensions/shape.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #include <X11/Xutil.h> | 10 #include <X11/Xutil.h> |
(...skipping 25 matching lines...) Expand all Loading... |
36 namespace views { | 36 namespace views { |
37 class DesktopDragDropClientAuraX11; | 37 class DesktopDragDropClientAuraX11; |
38 class DesktopDispatcherClient; | 38 class DesktopDispatcherClient; |
39 class DesktopWindowTreeHostObserverX11; | 39 class DesktopWindowTreeHostObserverX11; |
40 class X11DesktopWindowMoveClient; | 40 class X11DesktopWindowMoveClient; |
41 class X11WindowEventFilter; | 41 class X11WindowEventFilter; |
42 | 42 |
43 class VIEWS_EXPORT DesktopWindowTreeHostX11 | 43 class VIEWS_EXPORT DesktopWindowTreeHostX11 |
44 : public DesktopWindowTreeHost, | 44 : public DesktopWindowTreeHost, |
45 public aura::WindowTreeHost, | 45 public aura::WindowTreeHost, |
46 public ui::EventSource, | |
47 public ui::PlatformEventDispatcher { | 46 public ui::PlatformEventDispatcher { |
48 public: | 47 public: |
49 DesktopWindowTreeHostX11( | 48 DesktopWindowTreeHostX11( |
50 internal::NativeWidgetDelegate* native_widget_delegate, | 49 internal::NativeWidgetDelegate* native_widget_delegate, |
51 DesktopNativeWidgetAura* desktop_native_widget_aura); | 50 DesktopNativeWidgetAura* desktop_native_widget_aura); |
52 ~DesktopWindowTreeHostX11() override; | 51 ~DesktopWindowTreeHostX11() override; |
53 | 52 |
54 // A way of converting an X11 |xid| host window into a |content_window_|. | 53 // A way of converting an X11 |xid| host window into a |content_window_|. |
55 static aura::Window* GetContentWindowForXID(XID xid); | 54 static aura::Window* GetContentWindowForXID(XID xid); |
56 | 55 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 void Hide() override; | 154 void Hide() override; |
156 gfx::Rect GetBounds() const override; | 155 gfx::Rect GetBounds() const override; |
157 void SetBounds(const gfx::Rect& requested_bounds_in_pixels) override; | 156 void SetBounds(const gfx::Rect& requested_bounds_in_pixels) override; |
158 gfx::Point GetLocationOnNativeScreen() const override; | 157 gfx::Point GetLocationOnNativeScreen() const override; |
159 void SetCapture() override; | 158 void SetCapture() override; |
160 void ReleaseCapture() override; | 159 void ReleaseCapture() override; |
161 void SetCursorNative(gfx::NativeCursor cursor) override; | 160 void SetCursorNative(gfx::NativeCursor cursor) override; |
162 void MoveCursorToNative(const gfx::Point& location) override; | 161 void MoveCursorToNative(const gfx::Point& location) override; |
163 void OnCursorVisibilityChangedNative(bool show) override; | 162 void OnCursorVisibilityChangedNative(bool show) override; |
164 | 163 |
165 // Overridden frm ui::EventSource | |
166 ui::EventProcessor* GetEventProcessor() override; | |
167 | |
168 private: | 164 private: |
169 friend class DesktopWindowTreeHostX11HighDPITest; | 165 friend class DesktopWindowTreeHostX11HighDPITest; |
170 // Initializes our X11 surface to draw on. This method performs all | 166 // Initializes our X11 surface to draw on. This method performs all |
171 // initialization related to talking to the X11 server. | 167 // initialization related to talking to the X11 server. |
172 void InitX11Window(const Widget::InitParams& params); | 168 void InitX11Window(const Widget::InitParams& params); |
173 | 169 |
174 // Creates an aura::WindowEventDispatcher to contain the |content_window|, | 170 // Creates an aura::WindowEventDispatcher to contain the |content_window|, |
175 // along with all aura client objects that direct behavior. | 171 // along with all aura client objects that direct behavior. |
176 aura::WindowEventDispatcher* InitDispatcher(const Widget::InitParams& params); | 172 aura::WindowEventDispatcher* InitDispatcher(const Widget::InitParams& params); |
177 | 173 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 base::CancelableCallback<void()> delayed_resize_task_; | 346 base::CancelableCallback<void()> delayed_resize_task_; |
351 | 347 |
352 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; | 348 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; |
353 | 349 |
354 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); | 350 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); |
355 }; | 351 }; |
356 | 352 |
357 } // namespace views | 353 } // namespace views |
358 | 354 |
359 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 355 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
OLD | NEW |