| 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_COMMON_SHELF_OVERFLOW_BUTTON_H_ | 5 #ifndef ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ |
| 6 #define ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ | 6 #define ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
| 10 #include "ui/views/controls/button/custom_button.h" | 10 #include "ui/views/controls/button/custom_button.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 void OnShelfAlignmentChanged(); | 23 void OnShelfAlignmentChanged(); |
| 24 void OnOverflowBubbleShown(); | 24 void OnOverflowBubbleShown(); |
| 25 void OnOverflowBubbleHidden(); | 25 void OnOverflowBubbleHidden(); |
| 26 | 26 |
| 27 // Sets alpha value of the background and schedules a paint. | 27 // Sets alpha value of the background and schedules a paint. |
| 28 void SetBackgroundAlpha(int alpha); | 28 void SetBackgroundAlpha(int alpha); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // views::CustomButton: | 31 // views::CustomButton: |
| 32 void OnPaint(gfx::Canvas* canvas) override; | 32 void OnPaint(gfx::Canvas* canvas) override; |
| 33 std::unique_ptr<views::InkDrop> CreateInkDrop() override; |
| 33 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | 34 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 34 bool ShouldEnterPushedState(const ui::Event& event) override; | 35 bool ShouldEnterPushedState(const ui::Event& event) override; |
| 35 bool ShouldShowInkDropHighlight() const override; | |
| 36 void NotifyClick(const ui::Event& event) override; | 36 void NotifyClick(const ui::Event& event) override; |
| 37 | 37 |
| 38 // Helper functions to paint the background and foreground of the button | 38 // Helper functions to paint the background and foreground of the button |
| 39 // at |bounds|. | 39 // at |bounds|. |
| 40 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds); | 40 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds); |
| 41 void PaintForeground(gfx::Canvas* canvas, const gfx::Rect& bounds); | 41 void PaintForeground(gfx::Canvas* canvas, const gfx::Rect& bounds); |
| 42 | 42 |
| 43 // Returns the id of the asset to use for the button backgound based on the | 43 // Returns the id of the asset to use for the button backgound based on the |
| 44 // current shelf state. | 44 // current shelf state. |
| 45 // TODO(tdanderson): Remove this once the material design shelf is enabled | 45 // TODO(tdanderson): Remove this once the material design shelf is enabled |
| (...skipping 21 matching lines...) Expand all Loading... |
| 67 | 67 |
| 68 // Alpha value used to paint the background. | 68 // Alpha value used to paint the background. |
| 69 int background_alpha_; | 69 int background_alpha_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(OverflowButton); | 71 DISALLOW_COPY_AND_ASSIGN(OverflowButton); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace ash | 74 } // namespace ash |
| 75 | 75 |
| 76 #endif // ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ | 76 #endif // ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ |
| OLD | NEW |