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 #ifndef ASH_SHELF_OVERFLOW_BUTTON_H_ | 5 #ifndef ASH_SHELF_OVERFLOW_BUTTON_H_ |
6 #define ASH_SHELF_OVERFLOW_BUTTON_H_ | 6 #define ASH_SHELF_OVERFLOW_BUTTON_H_ |
7 | 7 |
8 #include "ash/common/shelf/shelf_types.h" | 8 #include "ash/common/shelf/shelf_types.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // current shelf state. | 36 // current shelf state. |
37 // TODO(tdanderson): Remove this once the material design shelf is enabled | 37 // TODO(tdanderson): Remove this once the material design shelf is enabled |
38 // by default. See crbug.com/614453. | 38 // by default. See crbug.com/614453. |
39 int NonMaterialBackgroundImageId(); | 39 int NonMaterialBackgroundImageId(); |
40 | 40 |
41 // Calculates the bounds of the overflow button based on the shelf alignment. | 41 // Calculates the bounds of the overflow button based on the shelf alignment. |
42 // TODO(tdanderson): The button size and bounds need to be adjusted to | 42 // TODO(tdanderson): The button size and bounds need to be adjusted to |
43 // conform to the material design spec. See crbug.com/617295. | 43 // conform to the material design spec. See crbug.com/617295. |
44 gfx::Rect CalculateButtonBounds(); | 44 gfx::Rect CalculateButtonBounds(); |
45 | 45 |
46 // Left and right images are rotations of bottom_image and are | 46 // Used for bottom shelf alignment. |bottom_image_| points to |
47 // owned by the overflow button. | 47 // |bottom_image_md_| for material design, otherwise it is points to a |
| 48 // resource owned by the ResourceBundle. |
| 49 // TODO(tdanderson): Remove the non-md code once the material design shelf is |
| 50 // enabled by default. See crbug.com/614453. |
| 51 const gfx::ImageSkia* bottom_image_; |
| 52 gfx::ImageSkia bottom_image_md_; |
| 53 |
| 54 // Cached rotations of |bottom_image_| used for left and right shelf |
| 55 // alignments. |
48 gfx::ImageSkia left_image_; | 56 gfx::ImageSkia left_image_; |
49 gfx::ImageSkia right_image_; | 57 gfx::ImageSkia right_image_; |
50 // Bottom image is owned by the resource bundle. | 58 |
51 const gfx::ImageSkia* bottom_image_; | |
52 Shelf* shelf_; | 59 Shelf* shelf_; |
53 | 60 |
54 DISALLOW_COPY_AND_ASSIGN(OverflowButton); | 61 DISALLOW_COPY_AND_ASSIGN(OverflowButton); |
55 }; | 62 }; |
56 | 63 |
57 } // namespace ash | 64 } // namespace ash |
58 | 65 |
59 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ | 66 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ |
OLD | NEW |