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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Issue 2410773002: Linux Aura: Use managed tab dragging when possible (Reland)
Patch Set: use POST_DISPATCH_NONE Created 4 years, 2 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
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/widget/desktop_aura/desktop_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_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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <X11/extensions/shape.h> 10 #include <X11/extensions/shape.h>
11 #include <X11/Xlib.h> 11 #include <X11/Xlib.h>
12 #include <X11/Xutil.h> 12 #include <X11/Xutil.h>
13 13
14 #include "base/cancelable_callback.h" 14 #include "base/cancelable_callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "ui/aura/scoped_window_targeter.h" 18 #include "ui/aura/scoped_window_targeter.h"
19 #include "ui/aura/window_tree_host.h" 19 #include "ui/aura/window_tree_host.h"
20 #include "ui/base/cursor/cursor_loader_x11.h" 20 #include "ui/base/cursor/cursor_loader_x11.h"
21 #include "ui/events/platform/platform_event_dispatcher.h" 21 #include "ui/events/platform/platform_event_dispatcher.h"
22 #include "ui/gfx/geometry/insets.h" 22 #include "ui/gfx/geometry/insets.h"
23 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
24 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
25 #include "ui/gfx/x/x11_atom_cache.h" 25 #include "ui/gfx/x/x11_atom_cache.h"
26 #include "ui/views/views_export.h" 26 #include "ui/views/views_export.h"
27 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" 27 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
28 28
29 namespace aura {
30 namespace client {
31 class WindowMoveClient;
32 }
33 }
34
29 namespace gfx { 35 namespace gfx {
30 class ImageSkia; 36 class ImageSkia;
31 class ImageSkiaRep; 37 class ImageSkiaRep;
32 } 38 }
33 39
34 namespace ui { 40 namespace ui {
35 class EventHandler; 41 class EventHandler;
36 class XScopedEventSelector; 42 class XScopedEventSelector;
37 } 43 }
38 44
39 namespace views { 45 namespace views {
40 class DesktopDragDropClientAuraX11; 46 class DesktopDragDropClientAuraX11;
41 class DesktopWindowTreeHostObserverX11; 47 class DesktopWindowTreeHostObserverX11;
42 class X11DesktopWindowMoveClient;
43 class X11WindowEventFilter; 48 class X11WindowEventFilter;
44 49
45 class VIEWS_EXPORT DesktopWindowTreeHostX11 50 class VIEWS_EXPORT DesktopWindowTreeHostX11
46 : public DesktopWindowTreeHost, 51 : public DesktopWindowTreeHost,
47 public aura::WindowTreeHost, 52 public aura::WindowTreeHost,
48 public ui::PlatformEventDispatcher { 53 public ui::PlatformEventDispatcher {
49 public: 54 public:
50 DesktopWindowTreeHostX11( 55 DesktopWindowTreeHostX11(
51 internal::NativeWidgetDelegate* native_widget_delegate, 56 internal::NativeWidgetDelegate* native_widget_delegate,
52 DesktopNativeWidgetAura* desktop_native_widget_aura); 57 DesktopNativeWidgetAura* desktop_native_widget_aura);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const; 280 gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const;
276 281
277 // Enables event listening after closing |dialog|. 282 // Enables event listening after closing |dialog|.
278 void EnableEventListening(); 283 void EnableEventListening();
279 284
280 // X11 things 285 // X11 things
281 // The display and the native X window hosting the root window. 286 // The display and the native X window hosting the root window.
282 XDisplay* xdisplay_; 287 XDisplay* xdisplay_;
283 ::Window xwindow_; 288 ::Window xwindow_;
284 289
290 // |xwindow_| is managed iff it is not override-redirect.
291 bool is_managed_;
292
285 // Events selected on |xwindow_|. 293 // Events selected on |xwindow_|.
286 std::unique_ptr<ui::XScopedEventSelector> xwindow_events_; 294 std::unique_ptr<ui::XScopedEventSelector> xwindow_events_;
287 295
288 // The native root window. 296 // The native root window.
289 ::Window x_root_window_; 297 ::Window x_root_window_;
290 298
291 ui::X11AtomCache atom_cache_; 299 ui::X11AtomCache atom_cache_;
292 300
293 // Is the window mapped to the screen? 301 // Is the window mapped to the screen?
294 bool window_mapped_; 302 bool window_mapped_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 344
337 // True if a Maximize() call should be done after mapping the window. 345 // True if a Maximize() call should be done after mapping the window.
338 bool should_maximize_after_map_; 346 bool should_maximize_after_map_;
339 347
340 // Whether we used an ARGB visual for our window. 348 // Whether we used an ARGB visual for our window.
341 bool use_argb_visual_; 349 bool use_argb_visual_;
342 350
343 DesktopDragDropClientAuraX11* drag_drop_client_; 351 DesktopDragDropClientAuraX11* drag_drop_client_;
344 352
345 std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_; 353 std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
346 std::unique_ptr<X11DesktopWindowMoveClient> x11_window_move_client_; 354 std::unique_ptr<aura::client::WindowMoveClient> x11_window_move_client_;
347 355
348 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura 356 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura
349 // instead of providing this route back to Widget. 357 // instead of providing this route back to Widget.
350 internal::NativeWidgetDelegate* native_widget_delegate_; 358 internal::NativeWidgetDelegate* native_widget_delegate_;
351 359
352 DesktopNativeWidgetAura* desktop_native_widget_aura_; 360 DesktopNativeWidgetAura* desktop_native_widget_aura_;
353 361
354 aura::Window* content_window_; 362 aura::Window* content_window_;
355 363
356 // We can optionally have a parent which can order us to close, or own 364 // We can optionally have a parent which can order us to close, or own
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 437
430 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 438 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
431 base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_; 439 base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
432 440
433 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 441 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
434 }; 442 };
435 443
436 } // namespace views 444 } // namespace views
437 445
438 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 446 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
OLDNEW
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698