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/shelf/overflow_button.h" | 5 #include "ash/shelf/overflow_button.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
10 #include "grit/ash_resources.h" | 10 #include "grit/ash_resources.h" |
11 #include "grit/ash_strings.h" | 11 #include "grit/ash_strings.h" |
12 #include "third_party/skia/include/core/SkPaint.h" | 12 #include "third_party/skia/include/core/SkPaint.h" |
13 #include "third_party/skia/include/core/SkPath.h" | 13 #include "third_party/skia/include/core/SkPath.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/gfx/animation/throb_animation.h" | 16 #include "ui/gfx/animation/throb_animation.h" |
17 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
18 #include "ui/gfx/image/image_skia_operations.h" | 18 #include "ui/gfx/image/image_skia_operations.h" |
19 #include "ui/gfx/skbitmap_operations.h" | 19 #include "ui/gfx/skbitmap_operations.h" |
20 #include "ui/gfx/skia_util.h" | 20 #include "ui/gfx/skia_util.h" |
21 #include "ui/gfx/transform.h" | 21 #include "ui/gfx/transform.h" |
22 #include "ui/views/widget/widget.h" | 22 #include "ui/views/widget/widget.h" |
23 | 23 |
24 namespace ash { | 24 namespace ash { |
25 namespace internal { | |
26 | |
27 namespace { | 25 namespace { |
28 | 26 |
29 const int kButtonHoverAlpha = 150; | 27 const int kButtonHoverAlpha = 150; |
30 | 28 |
31 const int kButtonCornerRadius = 2; | 29 const int kButtonCornerRadius = 2; |
32 | 30 |
33 const int kButtonHoverSize = 28; | 31 const int kButtonHoverSize = 28; |
34 | 32 |
35 const int kBackgroundOffset = (48 - kButtonHoverSize) / 2; | 33 const int kBackgroundOffset = (48 - kButtonHoverSize) / 2; |
36 | 34 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 default: | 162 default: |
165 image = bottom_image_; | 163 image = bottom_image_; |
166 break; | 164 break; |
167 } | 165 } |
168 | 166 |
169 canvas->DrawImageInt(*image, | 167 canvas->DrawImageInt(*image, |
170 bounds.x() + ((bounds.width() - image->width()) / 2), | 168 bounds.x() + ((bounds.width() - image->width()) / 2), |
171 bounds.y() + ((bounds.height() - image->height()) / 2)); | 169 bounds.y() + ((bounds.height() - image->height()) / 2)); |
172 } | 170 } |
173 | 171 |
174 } // namespace internal | |
175 } // namespace ash | 172 } // namespace ash |
OLD | NEW |