Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: ash/common/shelf/shelf_button.h

Issue 2447523002: [ash-md] Added different highlighting modes to the InkDropImpl. (Closed)
Patch Set: Fixed compile errors. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "ui/views/controls/button/custom_button.h" 11 #include "ui/views/controls/button/custom_button.h"
12 #include "ui/views/controls/image_view.h" 12 #include "ui/views/controls/image_view.h"
13 13
14 namespace views {
15 class InkDrop;
16 } // namespace views
17
14 namespace ash { 18 namespace ash {
15 class InkDropButtonListener; 19 class InkDropButtonListener;
16 class ShelfView; 20 class ShelfView;
17 21
18 // Button used for items on the launcher, except for the AppList. 22 // Button used for items on the launcher, except for the AppList.
19 class ASH_EXPORT ShelfButton : public views::CustomButton { 23 class ASH_EXPORT ShelfButton : public views::CustomButton {
20 public: 24 public:
21 static const char kViewClassName[]; 25 static const char kViewClassName[];
22 26
23 // Used to indicate the current state of the button. 27 // Used to indicate the current state of the button.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void OnFocus() override; 81 void OnFocus() override;
78 void OnBlur() override; 82 void OnBlur() override;
79 void OnPaint(gfx::Canvas* canvas) override; 83 void OnPaint(gfx::Canvas* canvas) override;
80 84
81 // ui::EventHandler overrides: 85 // ui::EventHandler overrides:
82 void OnGestureEvent(ui::GestureEvent* event) override; 86 void OnGestureEvent(ui::GestureEvent* event) override;
83 87
84 // views::CustomButton overrides: 88 // views::CustomButton overrides:
85 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; 89 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
86 bool ShouldEnterPushedState(const ui::Event& event) override; 90 bool ShouldEnterPushedState(const ui::Event& event) override;
87 bool ShouldShowInkDropHighlight() const override; 91 std::unique_ptr<views::InkDrop> CreateInkDrop() override;
88 void NotifyClick(const ui::Event& event) override; 92 void NotifyClick(const ui::Event& event) override;
89 93
90 // Sets the icon image with a shadow. 94 // Sets the icon image with a shadow.
91 void SetShadowedImage(const gfx::ImageSkia& bitmap); 95 void SetShadowedImage(const gfx::ImageSkia& bitmap);
92 96
93 private: 97 private:
94 class BarView; 98 class BarView;
95 99
96 // Updates the parts of the button to reflect the current |state_| and 100 // Updates the parts of the button to reflect the current |state_| and
97 // alignment. This may add or remove views, layout and paint. 101 // alignment. This may add or remove views, layout and paint.
(...skipping 21 matching lines...) Expand all
119 // If non-null the destuctor sets this to true. This is set while the menu is 123 // 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. 124 // showing and used to detect if the menu was deleted while running.
121 bool* destroyed_flag_; 125 bool* destroyed_flag_;
122 126
123 DISALLOW_COPY_AND_ASSIGN(ShelfButton); 127 DISALLOW_COPY_AND_ASSIGN(ShelfButton);
124 }; 128 };
125 129
126 } // namespace ash 130 } // namespace ash
127 131
128 #endif // ASH_COMMON_SHELF_SHELF_BUTTON_H_ 132 #endif // ASH_COMMON_SHELF_SHELF_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698