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

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: Call OnHostResizedInPixels() when scale factor changes 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..0b5e06ca3cbad1ddc9712cd37861a74b6f388e9d 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

Powered by Google App Engine
This is Rietveld 408576698