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

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

Issue 2467053002: Revert of Linux Aura: Make tab dragging great again (Closed)
Patch Set: Created 4 years, 1 month 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
35 namespace gfx { 29 namespace gfx {
36 class ImageSkia; 30 class ImageSkia;
37 class ImageSkiaRep; 31 class ImageSkiaRep;
38 } 32 }
39 33
40 namespace ui { 34 namespace ui {
41 class EventHandler; 35 class EventHandler;
42 class XScopedEventSelector; 36 class XScopedEventSelector;
43 } 37 }
44 38
45 namespace views { 39 namespace views {
46 class DesktopDragDropClientAuraX11; 40 class DesktopDragDropClientAuraX11;
47 class DesktopWindowTreeHostObserverX11; 41 class DesktopWindowTreeHostObserverX11;
42 class X11DesktopWindowMoveClient;
48 class X11WindowEventFilter; 43 class X11WindowEventFilter;
49 44
50 class VIEWS_EXPORT DesktopWindowTreeHostX11 45 class VIEWS_EXPORT DesktopWindowTreeHostX11
51 : public DesktopWindowTreeHost, 46 : public DesktopWindowTreeHost,
52 public aura::WindowTreeHost, 47 public aura::WindowTreeHost,
53 public ui::PlatformEventDispatcher { 48 public ui::PlatformEventDispatcher {
54 public: 49 public:
55 DesktopWindowTreeHostX11( 50 DesktopWindowTreeHostX11(
56 internal::NativeWidgetDelegate* native_widget_delegate, 51 internal::NativeWidgetDelegate* native_widget_delegate,
57 DesktopNativeWidgetAura* desktop_native_widget_aura); 52 DesktopNativeWidgetAura* desktop_native_widget_aura);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const; 275 gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const;
281 276
282 // Enables event listening after closing |dialog|. 277 // Enables event listening after closing |dialog|.
283 void EnableEventListening(); 278 void EnableEventListening();
284 279
285 // X11 things 280 // X11 things
286 // The display and the native X window hosting the root window. 281 // The display and the native X window hosting the root window.
287 XDisplay* xdisplay_; 282 XDisplay* xdisplay_;
288 ::Window xwindow_; 283 ::Window xwindow_;
289 284
290 // |xwindow_| is managed iff it is not override-redirect.
291 bool is_managed_;
292
293 // Events selected on |xwindow_|. 285 // Events selected on |xwindow_|.
294 std::unique_ptr<ui::XScopedEventSelector> xwindow_events_; 286 std::unique_ptr<ui::XScopedEventSelector> xwindow_events_;
295 287
296 // The native root window. 288 // The native root window.
297 ::Window x_root_window_; 289 ::Window x_root_window_;
298 290
299 ui::X11AtomCache atom_cache_; 291 ui::X11AtomCache atom_cache_;
300 292
301 // Is the window mapped to the screen? 293 // Is the window mapped to the screen?
302 bool window_mapped_; 294 bool window_mapped_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 336
345 // True if a Maximize() call should be done after mapping the window. 337 // True if a Maximize() call should be done after mapping the window.
346 bool should_maximize_after_map_; 338 bool should_maximize_after_map_;
347 339
348 // Whether we used an ARGB visual for our window. 340 // Whether we used an ARGB visual for our window.
349 bool use_argb_visual_; 341 bool use_argb_visual_;
350 342
351 DesktopDragDropClientAuraX11* drag_drop_client_; 343 DesktopDragDropClientAuraX11* drag_drop_client_;
352 344
353 std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_; 345 std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
354 std::unique_ptr<aura::client::WindowMoveClient> x11_window_move_client_; 346 std::unique_ptr<X11DesktopWindowMoveClient> x11_window_move_client_;
355 347
356 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura 348 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura
357 // instead of providing this route back to Widget. 349 // instead of providing this route back to Widget.
358 internal::NativeWidgetDelegate* native_widget_delegate_; 350 internal::NativeWidgetDelegate* native_widget_delegate_;
359 351
360 DesktopNativeWidgetAura* desktop_native_widget_aura_; 352 DesktopNativeWidgetAura* desktop_native_widget_aura_;
361 353
362 aura::Window* content_window_; 354 aura::Window* content_window_;
363 355
364 // We can optionally have a parent which can order us to close, or own 356 // 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
437 429
438 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 430 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
439 base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_; 431 base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
440 432
441 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 433 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
442 }; 434 };
443 435
444 } // namespace views 436 } // namespace views
445 437
446 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 438 #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