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

Side by Side Diff: ash/common/wm/overview/scoped_transform_overview_window.cc

Issue 2134943002: Make the ChromeOS overview window clear its 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/overview/scoped_transform_overview_window.h" 5 #include "ash/common/wm/overview/scoped_transform_overview_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 void ScopedTransformOverviewWindow::SetTransform( 394 void ScopedTransformOverviewWindow::SetTransform(
395 WmWindow* root_window, 395 WmWindow* root_window,
396 const gfx::Transform& transform, 396 const gfx::Transform& transform,
397 int radius) { 397 int radius) {
398 DCHECK(overview_started_); 398 DCHECK(overview_started_);
399 399
400 if (ash::MaterialDesignController::IsOverviewMaterial() && !mask_) { 400 if (ash::MaterialDesignController::IsOverviewMaterial() && !mask_) {
401 mask_.reset(new OverviewContentMask( 401 mask_.reset(new OverviewContentMask(
402 window()->GetIntProperty(WmWindowProperty::TOP_VIEW_INSET), radius)); 402 window()->GetIntProperty(WmWindowProperty::TOP_VIEW_INSET), radius));
403 mask_->layer()->SetFillsBoundsOpaquely(false);
varkha 2016/07/09 11:26:13 Brilliant, thanks for a quick tip! The code here [
403 mask_->layer()->SetBounds(GetTargetBoundsInScreen()); 404 mask_->layer()->SetBounds(GetTargetBoundsInScreen());
404 window()->GetLayer()->SetMaskLayer(mask_->layer()); 405 window()->GetLayer()->SetMaskLayer(mask_->layer());
405 } 406 }
406 407
407 gfx::Point target_origin(GetTargetBoundsInScreen().origin()); 408 gfx::Point target_origin(GetTargetBoundsInScreen().origin());
408 409
409 for (auto* window : GetTransientTreeIterator(window_)) { 410 for (auto* window : GetTransientTreeIterator(window_)) {
410 WmWindow* parent_window = window->GetParent(); 411 WmWindow* parent_window = window->GetParent();
411 gfx::Point original_origin = 412 gfx::Point original_origin =
412 parent_window->ConvertRectToScreen(window->GetTargetBounds()).origin(); 413 parent_window->ConvertRectToScreen(window->GetTargetBounds()).origin();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 if (parent_window) 449 if (parent_window)
449 parent_window->CloseWidget(); 450 parent_window->CloseWidget();
450 } 451 }
451 452
452 // static 453 // static
453 void ScopedTransformOverviewWindow::SetImmediateCloseForTests() { 454 void ScopedTransformOverviewWindow::SetImmediateCloseForTests() {
454 immediate_close_for_tests = true; 455 immediate_close_for_tests = true;
455 } 456 }
456 457
457 } // namespace ash 458 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698