| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shadow.h" | 5 #include "ash/wm/shadow.h" |
| 6 | 6 |
| 7 #include "ash/wm/image_grid.h" | 7 #include "ash/wm/image_grid.h" |
| 8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
| 10 #include "ui/gfx/compositor/scoped_layer_animation_settings.h" | 10 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 // Shadow opacity for different styles. | 14 // Shadow opacity for different styles. |
| 15 const float kActiveShadowOpacity = 1.0f; | 15 const float kActiveShadowOpacity = 1.0f; |
| 16 const float kInactiveShadowOpacity = 0.2f; | 16 const float kInactiveShadowOpacity = 0.2f; |
| 17 const float kSmallShadowOpacity = 1.0f; | 17 const float kSmallShadowOpacity = 1.0f; |
| 18 | 18 |
| 19 // Duration for opacity animation in milliseconds. | 19 // Duration for opacity animation in milliseconds. |
| 20 const int64 kAnimationDurationMs = 200; | 20 const int64 kAnimationDurationMs = 200; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 UpdateImageGridBounds(); | 166 UpdateImageGridBounds(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void Shadow::UpdateImageGridBounds() { | 169 void Shadow::UpdateImageGridBounds() { |
| 170 // Update bounds based on content bounds and image sizes. | 170 // Update bounds based on content bounds and image sizes. |
| 171 image_grid_->SetContentBounds(content_bounds_); | 171 image_grid_->SetContentBounds(content_bounds_); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace internal | 174 } // namespace internal |
| 175 } // namespace ash | 175 } // namespace ash |
| OLD | NEW |