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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Issue 2963033002: Linux UI: Dynamically respond to changes in the scale factor (Closed)
Patch Set: LinuxUI may not exist in test scenarios Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index c0e1763449def134e9b90d9516af60b578f56c9a..de7fd801593cd9c1d4efa67efa4b392d70976bdb 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -18,6 +18,7 @@
#include "ui/aura/scoped_window_targeter.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/cursor/cursor_loader_x11.h"
+#include "ui/display/display_observer.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect.h"
@@ -44,7 +45,8 @@ class X11DesktopWindowMoveClient;
class VIEWS_EXPORT DesktopWindowTreeHostX11
: public DesktopWindowTreeHost,
public aura::WindowTreeHost,
- public ui::PlatformEventDispatcher {
+ public ui::PlatformEventDispatcher,
+ public display::DisplayObserver {
public:
DesktopWindowTreeHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
@@ -169,6 +171,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
const gfx::Point& location_in_pixels) override;
void OnCursorVisibilityChangedNative(bool show) override;
+ // Overridden from display::DisplayObserver:
+ void OnDisplayAdded(const display::Display& new_display) override;
+ void OnDisplayRemoved(const display::Display& old_display) override;
+ void OnDisplayMetricsChanged(const display::Display& display,
+ uint32_t changed_metrics) override;
+
private:
friend class DesktopWindowTreeHostX11HighDPITest;
// Initializes our X11 surface to draw on. This method performs all
@@ -277,6 +285,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Enables event listening after closing |dialog|.
void EnableEventListening();
+ // Removes |delayed_resize_task_| from the task queue (if it's in
+ // the queue) and adds it back at the end of the queue.
+ void RestartDelayedResizeTask();
+
// X11 things
// The display and the native X window hosting the root window.
XDisplay* xdisplay_;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.cc ('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