OLD | NEW |
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/wm/overview/window_selector_window.h" | 5 #include "ash/wm/overview/window_selector_window.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/overview/scoped_transform_overview_window.h" | 10 #include "ash/wm/overview/scoped_transform_overview_window.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const gfx::Rect& target_bounds, | 64 const gfx::Rect& target_bounds, |
65 bool animate) { | 65 bool animate) { |
66 gfx::Rect src_rect = transform_window_.GetBoundsInScreen(); | 66 gfx::Rect src_rect = transform_window_.GetBoundsInScreen(); |
67 set_bounds(ScopedTransformOverviewWindow:: | 67 set_bounds(ScopedTransformOverviewWindow:: |
68 ShrinkRectToFitPreservingAspectRatio(src_rect, target_bounds)); | 68 ShrinkRectToFitPreservingAspectRatio(src_rect, target_bounds)); |
69 transform_window_.SetTransform(root_window, | 69 transform_window_.SetTransform(root_window, |
70 ScopedTransformOverviewWindow::GetTransformForRect(src_rect, bounds()), | 70 ScopedTransformOverviewWindow::GetTransformForRect(src_rect, bounds()), |
71 animate); | 71 animate); |
72 } | 72 } |
73 | 73 |
| 74 void WindowSelectorWindow::ChangeItemVisibility(bool visible) { |
| 75 transform_window_.window()->layer()->SetOpacity(visible ? 1 : 0.5); |
| 76 } |
| 77 |
74 } // namespace ash | 78 } // namespace ash |
OLD | NEW |