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

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

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 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/focus_rules.cc ('k') | ash/wm/overview/scoped_transform_overview_window.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/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h" 9 #include "ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
10 #include "ash/wm_window.h" 10 #include "ash/wm_window.h"
(...skipping 17 matching lines...) Expand all
28 : container_(container), in_restacking_(false) { 28 : container_(container), in_restacking_(false) {
29 background_ = new views::Widget; 29 background_ = new views::Widget;
30 views::Widget::InitParams params( 30 views::Widget::InitParams params(
31 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 31 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
32 params.bounds = container_->GetBoundsInScreen(); 32 params.bounds = container_->GetBoundsInScreen();
33 params.layer_type = ui::LAYER_SOLID_COLOR; 33 params.layer_type = ui::LAYER_SOLID_COLOR;
34 params.name = "WorkspaceBackdropDelegate"; 34 params.name = "WorkspaceBackdropDelegate";
35 // To disallow the MRU list from picking this window up it should not be 35 // To disallow the MRU list from picking this window up it should not be
36 // activateable. 36 // activateable.
37 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; 37 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
38 DCHECK_NE(kShellWindowId_Invalid, container_->GetShellWindowId()); 38 DCHECK_NE(kShellWindowId_Invalid, container_->aura_window()->id());
39 container_->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( 39 container_->GetRootWindowController()->ConfigureWidgetInitParamsForContainer(
40 background_, container_->GetShellWindowId(), &params); 40 background_, container_->aura_window()->id(), &params);
41 background_->Init(params); 41 background_->Init(params);
42 background_window_ = WmWindow::Get(background_->GetNativeWindow()); 42 background_window_ = WmWindow::Get(background_->GetNativeWindow());
43 // Do not use the animation system. We don't want the bounds animation and 43 // Do not use the animation system. We don't want the bounds animation and
44 // opacity needs to get set to |kBackdropOpacity|. 44 // opacity needs to get set to |kBackdropOpacity|.
45 background_window_->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); 45 background_window_->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE);
46 background_window_->GetLayer()->SetColor(SK_ColorBLACK); 46 background_window_->GetLayer()->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_window_->GetLayer()->SetBounds(params.bounds); 48 background_window_->GetLayer()->SetBounds(params.bounds);
49 DCHECK(background_window_->GetBounds() == params.bounds); 49 DCHECK(background_window_->GetBounds() == params.bounds);
50 Show(); 50 Show();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 void WorkspaceBackdropDelegate::Show() { 124 void WorkspaceBackdropDelegate::Show() {
125 background_window_->GetLayer()->SetOpacity(0.0f); 125 background_window_->GetLayer()->SetOpacity(0.0f);
126 background_->Show(); 126 background_->Show();
127 background_->SetFullscreen(true); 127 background_->SetFullscreen(true);
128 ui::ScopedLayerAnimationSettings settings( 128 ui::ScopedLayerAnimationSettings settings(
129 background_window_->GetLayer()->GetAnimator()); 129 background_window_->GetLayer()->GetAnimator());
130 background_window_->GetLayer()->SetOpacity(kBackdropOpacity); 130 background_window_->GetLayer()->SetOpacity(kBackdropOpacity);
131 } 131 }
132 132
133 } // namespace ash 133 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/focus_rules.cc ('k') | ash/wm/overview/scoped_transform_overview_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698