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

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

Issue 286733002: [Refactor] Consolidate the logic for whether a widget can be activated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/gestures/long_press_affordance_handler.cc ('k') | ash/wm/overview/scoped_window_copy.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 17 matching lines...) Expand all
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_->bounds(); 34 params.bounds = container_->bounds();
35 params.layer_type = aura::WINDOW_LAYER_SOLID_COLOR; 35 params.layer_type = aura::WINDOW_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.can_activate = false; 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");
46 background_->GetNativeView()->layer()->SetColor(SK_ColorBLACK); 46 background_->GetNativeView()->layer()->SetColor(SK_ColorBLACK);
47 // Make sure that the layer covers visibly everything - including the shelf. 47 // Make sure that the layer covers visibly everything - including the shelf.
48 background_->GetNativeView()->layer()->SetBounds(params.bounds); 48 background_->GetNativeView()->layer()->SetBounds(params.bounds);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void WorkspaceBackdropDelegate::Show() { 148 void WorkspaceBackdropDelegate::Show() {
149 background_->GetNativeView()->layer()->SetOpacity(0.0f); 149 background_->GetNativeView()->layer()->SetOpacity(0.0f);
150 background_->Show(); 150 background_->Show();
151 ui::ScopedLayerAnimationSettings settings( 151 ui::ScopedLayerAnimationSettings settings(
152 background_->GetNativeView()->layer()->GetAnimator()); 152 background_->GetNativeView()->layer()->GetAnimator());
153 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity); 153 background_->GetNativeView()->layer()->SetOpacity(kBackdropOpacity);
154 } 154 }
155 155
156 } // namespace ash 156 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/gestures/long_press_affordance_handler.cc ('k') | ash/wm/overview/scoped_window_copy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698