| 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 #ifndef ASH_LAUNCHER_OVERFLOW_BUTTON_H_ | 5 #ifndef ASH_LAUNCHER_OVERFLOW_BUTTON_H_ |
| 6 #define ASH_LAUNCHER_OVERFLOW_BUTTON_H_ | 6 #define ASH_LAUNCHER_OVERFLOW_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/wm/shelf_types.h" | 8 #include "ash/wm/shelf_types.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "ui/views/controls/button/custom_button.h" | 11 #include "ui/views/controls/button/custom_button.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class ImageSkia; | 14 class ImageSkia; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 namespace internal { | 18 namespace internal { |
| 19 | 19 |
| 20 // Launcher overflow chevron button. | 20 // Launcher overflow chevron button. |
| 21 class OverflowButton : public views::CustomButton { | 21 class OverflowButton : public views::CustomButton { |
| 22 public: | 22 public: |
| 23 explicit OverflowButton(views::ButtonListener* listener); | 23 explicit OverflowButton(views::ButtonListener* listener); |
| 24 virtual ~OverflowButton(); | 24 virtual ~OverflowButton(); |
| 25 | 25 |
| 26 void SetShelfAlignment(ShelfAlignment alignment); | 26 void OnShelfAlignmentChanged(); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 void PaintBackground(gfx::Canvas* canvas, int alpha); | 29 void PaintBackground(gfx::Canvas* canvas, int alpha); |
| 30 | 30 |
| 31 // views::View overrides: | 31 // views::View overrides: |
| 32 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 32 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 33 | 33 |
| 34 ShelfAlignment alignment_; | |
| 35 const gfx::ImageSkia* image_; | 34 const gfx::ImageSkia* image_; |
| 36 | 35 |
| 37 DISALLOW_COPY_AND_ASSIGN(OverflowButton); | 36 DISALLOW_COPY_AND_ASSIGN(OverflowButton); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace internal | 39 } // namespace internal |
| 41 } // namespace ash | 40 } // namespace ash |
| 42 | 41 |
| 43 #endif // ASH_LAUNCHER_OVERFLOW_BUTTON_H_ | 42 #endif // ASH_LAUNCHER_OVERFLOW_BUTTON_H_ |
| OLD | NEW |