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/common/wm/overview/window_selector_item.h" | 5 #include "ash/common/wm/overview/window_selector_item.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 13 matching lines...) Expand all Loading... |
24 #include "ash/public/cpp/shell_window_ids.h" | 24 #include "ash/public/cpp/shell_window_ids.h" |
25 #include "ash/resources/vector_icons/vector_icons.h" | 25 #include "ash/resources/vector_icons/vector_icons.h" |
26 #include "ash/root_window_controller.h" | 26 #include "ash/root_window_controller.h" |
27 #include "base/auto_reset.h" | 27 #include "base/auto_reset.h" |
28 #include "base/strings/string_util.h" | 28 #include "base/strings/string_util.h" |
29 #include "base/strings/utf_string_conversions.h" | 29 #include "base/strings/utf_string_conversions.h" |
30 #include "base/time/time.h" | 30 #include "base/time/time.h" |
31 #include "grit/ash_strings.h" | 31 #include "grit/ash_strings.h" |
32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
33 #include "ui/compositor/layer_animation_sequence.h" | 33 #include "ui/compositor/layer_animation_sequence.h" |
| 34 #include "ui/compositor/layer_type.h" |
34 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 35 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
35 #include "ui/gfx/animation/slide_animation.h" | 36 #include "ui/gfx/animation/slide_animation.h" |
36 #include "ui/gfx/canvas.h" | 37 #include "ui/gfx/canvas.h" |
37 #include "ui/gfx/color_utils.h" | 38 #include "ui/gfx/color_utils.h" |
38 #include "ui/gfx/geometry/safe_integer_conversions.h" | 39 #include "ui/gfx/geometry/safe_integer_conversions.h" |
39 #include "ui/gfx/paint_vector_icon.h" | 40 #include "ui/gfx/paint_vector_icon.h" |
40 #include "ui/gfx/transform_util.h" | 41 #include "ui/gfx/transform_util.h" |
41 #include "ui/strings/grit/ui_strings.h" | 42 #include "ui/strings/grit/ui_strings.h" |
42 #include "ui/views/background.h" | 43 #include "ui/views/background.h" |
43 #include "ui/views/border.h" | 44 #include "ui/views/border.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 int corner_radius, | 186 int corner_radius, |
186 SkColor background) | 187 SkColor background) |
187 : item_(item), | 188 : item_(item), |
188 item_window_(item_window), | 189 item_window_(item_window), |
189 corner_radius_(corner_radius), | 190 corner_radius_(corner_radius), |
190 initial_color_(background), | 191 initial_color_(background), |
191 target_color_(background), | 192 target_color_(background), |
192 current_value_(0), | 193 current_value_(0), |
193 layer_(nullptr), | 194 layer_(nullptr), |
194 animation_(new gfx::SlideAnimation(this)) { | 195 animation_(new gfx::SlideAnimation(this)) { |
195 SetPaintToLayer(true); | 196 SetPaintToLayer(ui::LAYER_TEXTURED); |
196 layer()->SetFillsBoundsOpaquely(false); | 197 layer()->SetFillsBoundsOpaquely(false); |
197 } | 198 } |
198 | 199 |
199 ~RoundedContainerView() override { StopObservingLayerAnimations(); } | 200 ~RoundedContainerView() override { StopObservingLayerAnimations(); } |
200 | 201 |
201 void OnItemRestored() { | 202 void OnItemRestored() { |
202 item_ = nullptr; | 203 item_ = nullptr; |
203 item_window_ = nullptr; | 204 item_window_ = nullptr; |
204 } | 205 } |
205 | 206 |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 | 789 |
789 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { | 790 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { |
790 return background_view_ ? background_view_->animation() : nullptr; | 791 return background_view_ ? background_view_->animation() : nullptr; |
791 } | 792 } |
792 | 793 |
793 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { | 794 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { |
794 return transform_window_.GetOverviewWindowForMinimizedState(); | 795 return transform_window_.GetOverviewWindowForMinimizedState(); |
795 } | 796 } |
796 | 797 |
797 } // namespace ash | 798 } // namespace ash |
OLD | NEW |