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

Side by Side Diff: ash/shelf/overflow_button.h

Issue 2033553003: Add MD ink drop ripple to shelf app items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased (after r398375) Created 4 years, 6 months 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_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"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/views/controls/button/custom_button.h" 12 #include "ui/views/controls/button/custom_button.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 class Shelf; 16 class ShelfView;
17 17
18 // Shelf overflow chevron button. 18 // Shelf overflow chevron button.
19 class OverflowButton : public views::CustomButton { 19 class OverflowButton : public views::CustomButton {
20 public: 20 public:
21 OverflowButton(views::ButtonListener* listener, Shelf* shelf); 21 OverflowButton(ShelfView* shelf_view);
bruthig 2016/06/09 03:25:59 explicit
mohsen 2016/06/09 21:24:50 Thanks for catching this. Done.
22 ~OverflowButton() override; 22 ~OverflowButton() override;
23 23
24 void OnShelfAlignmentChanged(); 24 void OnShelfAlignmentChanged();
25 25
26 private: 26 private:
27 void PaintBackground(gfx::Canvas* canvas, int alpha); 27 void PaintBackground(gfx::Canvas* canvas, int alpha);
28 28
29 // views::View overrides: 29 // views::View overrides:
30 void OnPaint(gfx::Canvas* canvas) override; 30 void OnPaint(gfx::Canvas* canvas) override;
31 31
32 // views::CustomButton:
33 void NotifyClick(const ui::Event& event) override;
34
32 // Left and right images are rotations of bottom_image and are 35 // Left and right images are rotations of bottom_image and are
33 // owned by the overflow button. 36 // owned by the overflow button.
34 gfx::ImageSkia left_image_; 37 gfx::ImageSkia left_image_;
35 gfx::ImageSkia right_image_; 38 gfx::ImageSkia right_image_;
36 // Bottom image is owned by the resource bundle. 39 // Bottom image is owned by the resource bundle.
37 const gfx::ImageSkia* bottom_image_; 40 const gfx::ImageSkia* bottom_image_;
38 Shelf* shelf_; 41 ShelfView* shelf_view_;
39 42
40 DISALLOW_COPY_AND_ASSIGN(OverflowButton); 43 DISALLOW_COPY_AND_ASSIGN(OverflowButton);
41 }; 44 };
42 45
43 } // namespace ash 46 } // namespace ash
44 47
45 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ 48 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698