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

Unified Diff: ash/common/wm/overview/scoped_transform_overview_window.cc

Issue 2129213003: [ash-md] Hides frame headers in overview mode not using a mask (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: ash/common/wm/overview/scoped_transform_overview_window.cc
diff --git a/ash/common/wm/overview/scoped_transform_overview_window.cc b/ash/common/wm/overview/scoped_transform_overview_window.cc
index ca1974343fc8cc04797ae5dae6cc593286b98d7c..add6ff6001d076c85c394d386506ed5e8c10ca14 100644
--- a/ash/common/wm/overview/scoped_transform_overview_window.cc
+++ b/ash/common/wm/overview/scoped_transform_overview_window.cc
@@ -180,7 +180,7 @@ TransientDescendantIteratorRange GetTransientTreeIterator(WmWindow* window) {
class ScopedTransformOverviewWindow::OverviewContentMask
: public ui::LayerDelegate {
public:
- OverviewContentMask(int inset, int radius);
+ OverviewContentMask(int radius);
tdanderson 2016/07/08 18:51:55 explicit
~OverviewContentMask() override;
ui::Layer* layer() { return &layer_; }
@@ -193,16 +193,14 @@ class ScopedTransformOverviewWindow::OverviewContentMask
private:
ui::Layer layer_;
- int inset_;
int radius_;
DISALLOW_COPY_AND_ASSIGN(OverviewContentMask);
};
ScopedTransformOverviewWindow::OverviewContentMask::OverviewContentMask(
- int inset,
int radius)
- : layer_(ui::LAYER_TEXTURED), inset_(inset), radius_(radius) {
+ : layer_(ui::LAYER_TEXTURED), radius_(radius) {
layer_.set_delegate(this);
}
@@ -214,7 +212,6 @@ void ScopedTransformOverviewWindow::OverviewContentMask::OnPaintLayer(
const ui::PaintContext& context) {
ui::PaintRecorder recorder(context, layer()->size());
gfx::Rect bounds(layer()->bounds().size());
- bounds.Inset(0, inset_, 0, 0);
// Tile a window into an area, rounding the bottom corners.
const SkRect rect = gfx::RectToSkRect(bounds);
@@ -398,8 +395,7 @@ void ScopedTransformOverviewWindow::SetTransform(
DCHECK(overview_started_);
if (ash::MaterialDesignController::IsOverviewMaterial() && !mask_) {
- mask_.reset(new OverviewContentMask(
- window()->GetIntProperty(WmWindowProperty::TOP_VIEW_INSET), radius));
+ mask_.reset(new OverviewContentMask(radius));
mask_->layer()->SetBounds(GetTargetBoundsInScreen());
window()->GetLayer()->SetMaskLayer(mask_->layer());
}
« no previous file with comments | « no previous file | ash/frame/custom_frame_view_ash.cc » ('j') | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698