diff options
Diffstat (limited to 'chromium/ui/ozone/platform/scenic/scenic_window.h')
-rw-r--r-- | chromium/ui/ozone/platform/scenic/scenic_window.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/chromium/ui/ozone/platform/scenic/scenic_window.h b/chromium/ui/ozone/platform/scenic/scenic_window.h index e2ff6ed51e7..6d674ff4989 100644 --- a/chromium/ui/ozone/platform/scenic/scenic_window.h +++ b/chromium/ui/ozone/platform/scenic/scenic_window.h @@ -82,7 +82,7 @@ class COMPONENT_EXPORT(OZONE) ScenicWindow : public PlatformWindow, void Deactivate() override; void SetUseNativeFrame(bool use_native_frame) override; bool ShouldUseNativeFrame() const override; - void SetCursor(PlatformCursor cursor) override; + void SetCursor(scoped_refptr<PlatformCursor> cursor) override; void MoveCursorTo(const gfx::Point& location) override; void ConfineCursorToBounds(const gfx::Rect& bounds) override; void SetRestoredBoundsInPixels(const gfx::Rect& bounds) override; @@ -144,8 +144,11 @@ class COMPONENT_EXPORT(OZONE) ScenicWindow : public PlatformWindow, std::unique_ptr<scenic::ViewHolder> surface_view_holder_; - // The ratio used for translating device-independent coordinates to absolute - // pixel coordinates. + // The scale between logical pixels and physical pixels, set based on the + // fuchsia::ui::gfx::Metrics event. It's used to calculate dimensions of the + // view in physical pixels in UpdateSize(). This value doesn't affect the + // device_scale_factor reported by ScenicScreen for the corresponding display + // (currently always 1.0, see crbug.com/1215330). float device_pixel_ratio_ = 0.f; // Current view size in DIPs. @@ -157,10 +160,15 @@ class COMPONENT_EXPORT(OZONE) ScenicWindow : public PlatformWindow, // corresponding Scenic view. gfx::Rect bounds_; - base::Optional<fuchsia::ui::gfx::ViewProperties> view_properties_; + absl::optional<fuchsia::ui::gfx::ViewProperties> view_properties_; bool visible_ = false; + // Tracks if the View was previously hidden due to having a size of zero. + // If the View was previously zero sized, then we need to re-attach it to + // its parent before we change its size to non-zero; and vice versa. + bool previous_view_is_zero_sized_ = false; + DISALLOW_COPY_AND_ASSIGN(ScenicWindow); }; |