| 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_SHELF_BUTTON_H_ | 5 #ifndef ASH_COMMON_SHELF_SHELF_BUTTON_H_ |
| 6 #define ASH_COMMON_SHELF_SHELF_BUTTON_H_ | 6 #define ASH_COMMON_SHELF_SHELF_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/gfx/shadow_value.h" | 10 #include "ui/gfx/shadow_value.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void OnFocus() override; | 77 void OnFocus() override; |
| 78 void OnBlur() override; | 78 void OnBlur() override; |
| 79 void OnPaint(gfx::Canvas* canvas) override; | 79 void OnPaint(gfx::Canvas* canvas) override; |
| 80 | 80 |
| 81 // ui::EventHandler overrides: | 81 // ui::EventHandler overrides: |
| 82 void OnGestureEvent(ui::GestureEvent* event) override; | 82 void OnGestureEvent(ui::GestureEvent* event) override; |
| 83 | 83 |
| 84 // views::CustomButton overrides: | 84 // views::CustomButton overrides: |
| 85 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | 85 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 86 bool ShouldEnterPushedState(const ui::Event& event) override; | 86 bool ShouldEnterPushedState(const ui::Event& event) override; |
| 87 bool ShouldShowInkDropHighlight() const override; | 87 std::unique_ptr<views::InkDrop> CreateInkDrop() override; |
| 88 void NotifyClick(const ui::Event& event) override; | 88 void NotifyClick(const ui::Event& event) override; |
| 89 | 89 |
| 90 // Sets the icon image with a shadow. | 90 // Sets the icon image with a shadow. |
| 91 void SetShadowedImage(const gfx::ImageSkia& bitmap); | 91 void SetShadowedImage(const gfx::ImageSkia& bitmap); |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 class BarView; | 94 class BarView; |
| 95 | 95 |
| 96 // Updates the parts of the button to reflect the current |state_| and | 96 // Updates the parts of the button to reflect the current |state_| and |
| 97 // alignment. This may add or remove views, layout and paint. | 97 // alignment. This may add or remove views, layout and paint. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 119 // If non-null the destuctor sets this to true. This is set while the menu is | 119 // If non-null the destuctor sets this to true. This is set while the menu is |
| 120 // showing and used to detect if the menu was deleted while running. | 120 // showing and used to detect if the menu was deleted while running. |
| 121 bool* destroyed_flag_; | 121 bool* destroyed_flag_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(ShelfButton); | 123 DISALLOW_COPY_AND_ASSIGN(ShelfButton); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace ash | 126 } // namespace ash |
| 127 | 127 |
| 128 #endif // ASH_COMMON_SHELF_SHELF_BUTTON_H_ | 128 #endif // ASH_COMMON_SHELF_SHELF_BUTTON_H_ |
| OLD | NEW |