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

Side by Side Diff: ash/wm/maximize_mode/workspace_backdrop_delegate.cc

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 years, 8 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 | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/stacking_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/wm/maximize_mode/workspace_backdrop_delegate.h" 5 #include "ash/wm/maximize_mode/workspace_backdrop_delegate.h"
6 6
7 #include "ash/wm/window_animations.h" 7 #include "ash/wm/window_animations.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 14 matching lines...) Expand all
25 25
26 WorkspaceBackdropDelegate::WorkspaceBackdropDelegate(aura::Window* container) 26 WorkspaceBackdropDelegate::WorkspaceBackdropDelegate(aura::Window* container)
27 : background_(NULL), 27 : background_(NULL),
28 container_(container), 28 container_(container),
29 in_restacking_(false) { 29 in_restacking_(false) {
30 background_ = new views::Widget; 30 background_ = new views::Widget;
31 views::Widget::InitParams params( 31 views::Widget::InitParams params(
32 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 32 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
33 params.parent = container_; 33 params.parent = container_;
34 params.bounds = container_->GetBoundsInScreen(); 34 params.bounds = container_->GetBoundsInScreen();
35 params.layer_type = aura::WINDOW_LAYER_SOLID_COLOR; 35 params.layer_type = ui::LAYER_SOLID_COLOR;
36 // To disallow the MRU list from picking this window up it should not be 36 // To disallow the MRU list from picking this window up it should not be
37 // activateable. 37 // activateable.
38 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; 38 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
39 background_->Init(params); 39 background_->Init(params);
40 // Do not use the animation system. We don't want the bounds animation and 40 // Do not use the animation system. We don't want the bounds animation and
41 // opacity needs to get set to |kBackdropOpacity|. 41 // opacity needs to get set to |kBackdropOpacity|.
42 ::wm::SetWindowVisibilityAnimationTransition( 42 ::wm::SetWindowVisibilityAnimationTransition(
43 background_->GetNativeView(), 43 background_->GetNativeView(),
44 ::wm::ANIMATE_NONE); 44 ::wm::ANIMATE_NONE);
45 background_->GetNativeView()->SetName("WorkspaceBackdropDelegate"); 45 background_->GetNativeView()->SetName("WorkspaceBackdropDelegate");
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 void WorkspaceBackdropDelegate::Show() { 156 void WorkspaceBackdropDelegate::Show() {
157 background_->GetNativeView()->layer()->SetOpacity(0.0f); 157 background_->GetNativeView()->layer()->SetOpacity(0.0f);
158 background_->Show(); 158 background_->Show();
159 ui::ScopedLayerAnimationSettings settings( 159 ui::ScopedLayerAnimationSettings settings(
160 background_->GetNativeView()->layer()->GetAnimator()); 160 background_->GetNativeView()->layer()->GetAnimator());
161 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); 161 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity);
162 } 162 }
163 163
164 } // namespace ash 164 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/stacking_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698