| OLD | NEW |
| 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 "ui/wm/core/shadow.h" | 5 #include "ui/wm/core/shadow.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 case IDR_WINDOW_BUBBLE_SHADOW_SMALL: | 53 case IDR_WINDOW_BUBBLE_SHADOW_SMALL: |
| 54 return image_small_; | 54 return image_small_; |
| 55 case IDR_AURA_SHADOW_ACTIVE: | 55 case IDR_AURA_SHADOW_ACTIVE: |
| 56 case IDR_AURA_SHADOW_INACTIVE: | 56 case IDR_AURA_SHADOW_INACTIVE: |
| 57 return image_large_; | 57 return image_large_; |
| 58 default: | 58 default: |
| 59 NOTREACHED(); | 59 NOTREACHED(); |
| 60 return gfx::Image(); | 60 return gfx::Image(); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 gfx::Image GetNativeImageNamed(int resource_id, | 63 gfx::Image GetNativeImageNamed(int resource_id) override { |
| 64 ui::ResourceBundle::ImageRTL rtl) override { | |
| 65 return gfx::Image(); | 64 return gfx::Image(); |
| 66 } | 65 } |
| 67 base::RefCountedStaticMemory* LoadDataResourceBytes( | 66 base::RefCountedStaticMemory* LoadDataResourceBytes( |
| 68 int resource_id, | 67 int resource_id, |
| 69 ui::ScaleFactor scale_factor) override { | 68 ui::ScaleFactor scale_factor) override { |
| 70 return NULL; | 69 return NULL; |
| 71 } | 70 } |
| 72 bool GetRawDataResource(int resource_id, | 71 bool GetRawDataResource(int resource_id, |
| 73 ui::ScaleFactor scale_factor, | 72 ui::ScaleFactor scale_factor, |
| 74 base::StringPiece* value) override { | 73 base::StringPiece* value) override { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 gfx::Rect content_bounds(100, 100, 300, 300); | 141 gfx::Rect content_bounds(100, 100, 300, 300); |
| 143 shadow.SetContentBounds(content_bounds); | 142 shadow.SetContentBounds(content_bounds); |
| 144 EXPECT_EQ(shadow.content_bounds(), content_bounds); | 143 EXPECT_EQ(shadow.content_bounds(), content_bounds); |
| 145 EXPECT_EQ(shadow.layer()->bounds(), gfx::Rect(36, 36, 428, 428)); | 144 EXPECT_EQ(shadow.layer()->bounds(), gfx::Rect(36, 36, 428, 428)); |
| 146 | 145 |
| 147 shadow.SetStyle(Shadow::STYLE_SMALL); | 146 shadow.SetStyle(Shadow::STYLE_SMALL); |
| 148 EXPECT_EQ(shadow.content_bounds(), content_bounds); | 147 EXPECT_EQ(shadow.content_bounds(), content_bounds); |
| 149 EXPECT_EQ(shadow.layer()->bounds(), gfx::Rect(96, 96, 308, 308)); | 148 EXPECT_EQ(shadow.layer()->bounds(), gfx::Rect(96, 96, 308, 308)); |
| 150 } | 149 } |
| 151 } // namespace wm | 150 } // namespace wm |
| OLD | NEW |