| 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 24 matching lines...) Expand all Loading... |
| 35 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds); | 35 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds); |
| 36 void PaintForeground(gfx::Canvas* canvas, const gfx::Rect& bounds); | 36 void PaintForeground(gfx::Canvas* canvas, const gfx::Rect& bounds); |
| 37 | 37 |
| 38 // Returns the id of the asset to use for the button backgound based on the | 38 // Returns the id of the asset to use for the button backgound based on the |
| 39 // current shelf state. | 39 // current shelf state. |
| 40 // TODO(tdanderson): Remove this once the material design shelf is enabled | 40 // TODO(tdanderson): Remove this once the material design shelf is enabled |
| 41 // by default. See crbug.com/614453. | 41 // by default. See crbug.com/614453. |
| 42 int NonMaterialBackgroundImageId(); | 42 int NonMaterialBackgroundImageId(); |
| 43 | 43 |
| 44 // Calculates the bounds of the overflow button based on the shelf alignment. | 44 // Calculates the bounds of the overflow button based on the shelf alignment. |
| 45 // TODO(tdanderson): The button size and bounds need to be adjusted to | |
| 46 // conform to the material design spec. See crbug.com/617295. | |
| 47 gfx::Rect CalculateButtonBounds(); | 45 gfx::Rect CalculateButtonBounds(); |
| 48 | 46 |
| 49 // Used for bottom shelf alignment. |bottom_image_| points to | 47 // Used for bottom shelf alignment. |bottom_image_| points to |
| 50 // |bottom_image_md_| for material design, otherwise it is points to a | 48 // |bottom_image_md_| for material design, otherwise it is points to a |
| 51 // resource owned by the ResourceBundle. | 49 // resource owned by the ResourceBundle. |
| 52 // TODO(tdanderson): Remove the non-md code once the material design shelf is | 50 // TODO(tdanderson): Remove the non-md code once the material design shelf is |
| 53 // enabled by default. See crbug.com/614453. | 51 // enabled by default. See crbug.com/614453. |
| 54 const gfx::ImageSkia* bottom_image_; | 52 const gfx::ImageSkia* bottom_image_; |
| 55 gfx::ImageSkia bottom_image_md_; | 53 gfx::ImageSkia bottom_image_md_; |
| 56 | 54 |
| 57 // Cached rotations of |bottom_image_| used for left and right shelf | 55 // Cached rotations of |bottom_image_| used for left and right shelf |
| 58 // alignments. | 56 // alignments. |
| 59 gfx::ImageSkia left_image_; | 57 gfx::ImageSkia left_image_; |
| 60 gfx::ImageSkia right_image_; | 58 gfx::ImageSkia right_image_; |
| 61 | 59 |
| 62 InkDropButtonListener* listener_; | 60 InkDropButtonListener* listener_; |
| 63 Shelf* shelf_; | 61 Shelf* shelf_; |
| 64 | 62 |
| 65 DISALLOW_COPY_AND_ASSIGN(OverflowButton); | 63 DISALLOW_COPY_AND_ASSIGN(OverflowButton); |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 } // namespace ash | 66 } // namespace ash |
| 69 | 67 |
| 70 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ | 68 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ |
| OLD | NEW |