Index: ash/common/wm/overview/scoped_transform_overview_window.h |
diff --git a/ash/common/wm/overview/scoped_transform_overview_window.h b/ash/common/wm/overview/scoped_transform_overview_window.h |
index 11b50ef1c146b9bc6358793687b1e6085d90749c..f6aee5e3b040b812b22ec38fc0b84d414da7ff40 100644 |
--- a/ash/common/wm/overview/scoped_transform_overview_window.h |
+++ b/ash/common/wm/overview/scoped_transform_overview_window.h |
@@ -12,6 +12,7 @@ |
#include "ash/common/wm/overview/overview_animation_type.h" |
#include "base/macros.h" |
#include "base/memory/weak_ptr.h" |
+#include "third_party/skia/include/core/SkColor.h" |
#include "ui/gfx/geometry/size.h" |
#include "ui/gfx/transform.h" |
@@ -32,6 +33,7 @@ class WmWindow; |
// object. |
class ASH_EXPORT ScopedTransformOverviewWindow { |
public: |
+ class OverviewContentMask; |
using ScopedAnimationSettings = |
std::vector<std::unique_ptr<ScopedOverviewAnimationSettings>>; |
@@ -97,6 +99,10 @@ class ASH_EXPORT ScopedTransformOverviewWindow { |
// header to be hidden. |
gfx::Rect GetTransformedBounds(bool hide_header) const; |
+ // Returns TOP_VIEW_COLOR property of |window_| unless there are transient |
+ // ancestors in which case returns SK_ColorTRANSPARENT. |
+ SkColor GetTopColor() const; |
+ |
// Returns TOP_VIEW_INSET property of |window_| unless there are transient |
// ancestors in which case returns 0. |
int GetTopInset() const; |
@@ -116,20 +122,24 @@ class ASH_EXPORT ScopedTransformOverviewWindow { |
void PrepareForOverview(); |
// Applies the |transform| to the overview window and all of its transient |
- // children. With Material Design creates a mask layer with the bottom edge |
- // using rounded corners of |radius|. When |use_mask| is set, hides the |
- // original window header and uses rounded rectangle mask which may be |
- // resource-intensive. When |use_shape| is set and |use_mask| is not, uses |
- // SetAlphaShape to mask the header. |
+ // children. |
void SetTransform(WmWindow* root_window, |
const gfx::Transform& transform, |
- bool use_mask, |
- bool use_shape, |
- float radius); |
+ bool use_mask); |
// Set's the opacity of the managed windows. |
void SetOpacity(float opacity); |
+ // Creates a mask layer with the bottom edge using rounded corners of |
+ // |radius|. When |use_mask| is set, hides the original window header and uses |
+ // rounded rectangle mask which may be resource-intensive. When |use_shape| is |
+ // set and |use_mask| is not, uses SetAlphaShape to mask the header. |
+ void HideHeaderAndSetShape(bool use_mask, bool use_shape, int radius); |
+ |
+ // Restores original window shape and removes the mask if installed. Safe to |
+ // call even if HideHeaderAndSetShape() has not been called. |
+ void ShowHeaderAndResetShape(); |
+ |
WmWindow* window() const { return window_; } |
// Closes the transient root of the window managed by |this|. |
@@ -137,7 +147,6 @@ class ASH_EXPORT ScopedTransformOverviewWindow { |
private: |
friend class WindowSelectorTest; |
- class OverviewContentMask; |
enum OriginalVisibility { |
ORIGINALLY_VISIBLE, |