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

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

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 years, 4 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
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/window_tree_host.h" 18 #include "ui/aura/window_tree_host.h"
19 #include "ui/base/cursor/cursor_loader_x11.h" 19 #include "ui/base/cursor/cursor_loader_x11.h"
20 #include "ui/display/display_observer.h"
20 #include "ui/events/platform/platform_event_dispatcher.h" 21 #include "ui/events/platform/platform_event_dispatcher.h"
21 #include "ui/gfx/geometry/insets.h" 22 #include "ui/gfx/geometry/insets.h"
22 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
23 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
24 #include "ui/gfx/x/x11_atom_cache.h" 25 #include "ui/gfx/x/x11_atom_cache.h"
25 #include "ui/views/views_export.h" 26 #include "ui/views/views_export.h"
26 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" 27 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
27 28
28 namespace gfx { 29 namespace gfx {
29 class ImageSkia; 30 class ImageSkia;
30 class ImageSkiaRep; 31 class ImageSkiaRep;
31 } 32 }
32 33
33 namespace ui { 34 namespace ui {
34 class EventHandler; 35 class EventHandler;
35 } 36 }
36 37
37 namespace views { 38 namespace views {
38 class DesktopDragDropClientAuraX11; 39 class DesktopDragDropClientAuraX11;
39 class DesktopWindowTreeHostObserverX11; 40 class DesktopWindowTreeHostObserverX11;
40 class X11DesktopWindowMoveClient; 41 class X11DesktopWindowMoveClient;
41 class X11WindowEventFilter; 42 class X11WindowEventFilter;
42 43
43 class VIEWS_EXPORT DesktopWindowTreeHostX11 44 class VIEWS_EXPORT DesktopWindowTreeHostX11
44 : public DesktopWindowTreeHost, 45 : public DesktopWindowTreeHost,
45 public aura::WindowTreeHost, 46 public aura::WindowTreeHost,
46 public ui::PlatformEventDispatcher { 47 public ui::PlatformEventDispatcher,
48 public display::DisplayObserver {
47 public: 49 public:
48 DesktopWindowTreeHostX11( 50 DesktopWindowTreeHostX11(
49 internal::NativeWidgetDelegate* native_widget_delegate, 51 internal::NativeWidgetDelegate* native_widget_delegate,
50 DesktopNativeWidgetAura* desktop_native_widget_aura); 52 DesktopNativeWidgetAura* desktop_native_widget_aura);
51 ~DesktopWindowTreeHostX11() override; 53 ~DesktopWindowTreeHostX11() override;
52 54
53 // A way of converting an X11 |xid| host window into a |content_window_|. 55 // A way of converting an X11 |xid| host window into a |content_window_|.
54 static aura::Window* GetContentWindowForXID(XID xid); 56 static aura::Window* GetContentWindowForXID(XID xid);
55 57
56 // A way of converting an X11 |xid| host window into this object. 58 // A way of converting an X11 |xid| host window into this object.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 241
240 void SetWindowTransparency(); 242 void SetWindowTransparency();
241 243
242 // Relayout the widget's client and non-client views. 244 // Relayout the widget's client and non-client views.
243 void Relayout(); 245 void Relayout();
244 246
245 // ui::PlatformEventDispatcher: 247 // ui::PlatformEventDispatcher:
246 bool CanDispatchEvent(const ui::PlatformEvent& event) override; 248 bool CanDispatchEvent(const ui::PlatformEvent& event) override;
247 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; 249 uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
248 250
251 // display::DisplayObserver:
252 void OnDisplayAdded(const display::Display& display) override {}
253 void OnDisplayRemoved(const display::Display& display) override {}
254 void OnDisplayMetricsChanged(const display::Display& display,
255 uint32_t changed_metrics) override;
256
249 void DelayedResize(const gfx::Size& size_in_pixels); 257 void DelayedResize(const gfx::Size& size_in_pixels);
250 258
251 gfx::Rect GetWorkAreaBoundsInPixels() const; 259 gfx::Rect GetWorkAreaBoundsInPixels() const;
252 gfx::Rect ToDIPRect(const gfx::Rect& rect_in_pixels) const; 260 gfx::Rect ToDIPRect(const gfx::Rect& rect_in_pixels) const;
253 gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const; 261 gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const;
254 262
255 // X11 things 263 // X11 things
256 // The display and the native X window hosting the root window. 264 // The display and the native X window hosting the root window.
257 XDisplay* xdisplay_; 265 XDisplay* xdisplay_;
258 ::Window xwindow_; 266 ::Window xwindow_;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 base::CancelableCallback<void()> delayed_resize_task_; 369 base::CancelableCallback<void()> delayed_resize_task_;
362 370
363 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 371 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
364 372
365 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 373 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
366 }; 374 };
367 375
368 } // namespace views 376 } // namespace views
369 377
370 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 378 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698