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

Unified Diff: services/ui/ws/platform_display_default.h

Issue 2763143002: Remove FrameGenerator::root_window_ (Closed)
Patch Set: Addressed comments Created 3 years, 9 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: services/ui/ws/platform_display_default.h
diff --git a/services/ui/ws/platform_display_default.h b/services/ui/ws/platform_display_default.h
index 25f4755df4bd21c1378871c80114aaa1bffdc22d..f319dd1d153de7661c0b4dff537ad6971d780f93 100644
--- a/services/ui/ws/platform_display_default.h
+++ b/services/ui/ws/platform_display_default.h
@@ -13,6 +13,7 @@
#include "services/ui/ws/platform_display.h"
#include "services/ui/ws/platform_display_delegate.h"
#include "services/ui/ws/server_window.h"
+#include "services/ui/ws/server_window_observer.h"
#include "ui/platform_window/platform_window_delegate.h"
namespace ui {
@@ -26,7 +27,8 @@ namespace ws {
// PlatformDisplay implementation that connects to a PlatformWindow and
// FrameGenerator for Chrome OS.
class PlatformDisplayDefault : public PlatformDisplay,
- public ui::PlatformWindowDelegate {
+ public ui::PlatformWindowDelegate,
+ public ServerWindowObserver {
public:
PlatformDisplayDefault(ServerWindow* root_window,
const display::ViewportMetrics& metrics);
@@ -66,6 +68,12 @@ class PlatformDisplayDefault : public PlatformDisplay,
void OnAcceleratedWidgetDestroyed() override;
void OnActivationChanged(bool active) override;
+ // ServerWindowObserver:
+ void OnWindowBoundsChanged(ServerWindow* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+ void OnWindowVisibilityChanged(ServerWindow* window) override;
+
ServerWindow* root_window_;
#if !defined(OS_ANDROID)
@@ -78,7 +86,6 @@ class PlatformDisplayDefault : public PlatformDisplay,
display::ViewportMetrics metrics_;
std::unique_ptr<ui::PlatformWindow> platform_window_;
gfx::AcceleratedWidget widget_;
- float init_device_scale_factor_;
DISALLOW_COPY_AND_ASSIGN(PlatformDisplayDefault);
};

Powered by Google App Engine
This is Rietveld 408576698