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

Unified Diff: components/exo/shell_surface.h

Issue 2686533004: Use pixel coordinates for shadow underlay bounds (Closed)
Patch Set: remove unnecessary changes Created 3 years, 10 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
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.h
diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h
index d644559c4cd17dd0fb63ae9d44f878761dc6c2e4..64eeb544606f39454794a180329ca6b2cb689265 100644
--- a/components/exo/shell_surface.h
+++ b/components/exo/shell_surface.h
@@ -147,12 +147,18 @@ class ShellSurface : public SurfaceDelegate,
// for the surface from the user's perspective.
void SetGeometry(const gfx::Rect& geometry);
- // Enable/disable rectangular shadow.
- void SetRectangularShadow(bool enabled);
+ // Enable/disable rectangular shadow that uses the widget bounds as a content
+ // bounds.
+ void SetRectangularShadowEnabled(bool enabled);
- // Set the content bounds for the shadow. Shell surface geometry will be
+ // [Deprecated] Set the content bounds for the shadow. Shell surface geometry
+ // will be
// used if bounds are empty.
- void SetRectangularShadowContentBounds(const gfx::Rect& content_bounds);
+ void SetRectangularShadow_DEPRECATED(const gfx::Rect& content_bounds);
+
+ // Set the content bounds for the shadow in the surface's coordinates.
+ // Setting empty bounds will disable the shadow.
+ void SetRectangularSurfaceShadow(const gfx::Rect& content_bounds);
// Set the pacity of the background for the window that has a shadow.
void SetRectangularShadowBackgroundOpacity(float opacity);
@@ -238,8 +244,11 @@ class ShellSurface : public SurfaceDelegate,
// Overridden from ui::AcceleratorTarget:
bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ aura::Window* shadow_overlay() { return shadow_overlay_; }
aura::Window* shadow_underlay() { return shadow_underlay_; }
+ Surface* surface_for_testing() { return surface_; }
+
private:
class ScopedConfigure;
class ScopedAnimationsDisabled;
@@ -320,6 +329,7 @@ class ShellSurface : public SurfaceDelegate,
std::unique_ptr<ScopedAnimationsDisabled> scoped_animations_disabled_;
int top_inset_height_ = 0;
int pending_top_inset_height_ = 0;
+ bool shadow_underlay_in_surface_ = true;
DISALLOW_COPY_AND_ASSIGN(ShellSurface);
};
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698