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 "ui/views/corewm/shadow.h" | 5 #include "ui/wm/core/shadow.h" |
6 | 6 |
7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 #include "ui/compositor/scoped_layer_animation_settings.h" | 9 #include "ui/compositor/scoped_layer_animation_settings.h" |
10 #include "ui/views/corewm/image_grid.h" | 10 #include "ui/wm/core/image_grid.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 // Interior inset for different styles. | 19 // Interior inset for different styles. |
20 const int kActiveInteriorInset = 0; | 20 const int kActiveInteriorInset = 0; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 void Shadow::UpdateImageGridBounds() { | 187 void Shadow::UpdateImageGridBounds() { |
188 // Update bounds based on content bounds and image sizes. | 188 // Update bounds based on content bounds and image sizes. |
189 gfx::Rect image_grid_bounds = content_bounds_; | 189 gfx::Rect image_grid_bounds = content_bounds_; |
190 image_grid_bounds.Inset(interior_inset_, interior_inset_); | 190 image_grid_bounds.Inset(interior_inset_, interior_inset_); |
191 image_grid_->SetContentBounds(image_grid_bounds); | 191 image_grid_->SetContentBounds(image_grid_bounds); |
192 } | 192 } |
193 | 193 |
194 } // namespace corewm | 194 } // namespace corewm |
195 } // namespace views | 195 } // namespace views |
OLD | NEW |