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

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

Issue 2053113002: Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into animate_shelf_chip_backgrounds Created 4 years, 4 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
« no previous file with comments | « ash/common/shelf/app_list_button.cc ('k') | ash/common/shelf/overflow_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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"
11 11
12 namespace ash { 12 namespace ash {
13 class InkDropButtonListener; 13 class InkDropButtonListener;
14 class WmShelf; 14 class WmShelf;
15 15
16 // Shelf overflow chevron button. 16 // Shelf overflow chevron button.
17 class OverflowButton : public views::CustomButton { 17 class OverflowButton : public views::CustomButton {
18 public: 18 public:
19 OverflowButton(InkDropButtonListener* listener, WmShelf* wm_shelf); 19 OverflowButton(InkDropButtonListener* listener, WmShelf* wm_shelf);
20 ~OverflowButton() override; 20 ~OverflowButton() override;
21 21
22 void OnShelfAlignmentChanged(); 22 void OnShelfAlignmentChanged();
23 23
24 // Sets alpha value of the background and schedules a paint.
25 void SetBackgroundAlpha(int alpha);
26
24 private: 27 private:
25 // views::View: 28 // views::View:
26 void OnPaint(gfx::Canvas* canvas) override; 29 void OnPaint(gfx::Canvas* canvas) override;
27 30
28 // views::CustomButton: 31 // views::CustomButton:
29 void NotifyClick(const ui::Event& event) override; 32 void NotifyClick(const ui::Event& event) override;
30 33
31 // Helper functions to paint the background and foreground of the button 34 // Helper functions to paint the background and foreground of the button
32 // at |bounds|. 35 // at |bounds|.
33 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds); 36 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds);
(...skipping 17 matching lines...) Expand all
51 gfx::ImageSkia bottom_image_md_; 54 gfx::ImageSkia bottom_image_md_;
52 55
53 // Cached rotations of |bottom_image_| used for left and right shelf 56 // Cached rotations of |bottom_image_| used for left and right shelf
54 // alignments. 57 // alignments.
55 gfx::ImageSkia left_image_; 58 gfx::ImageSkia left_image_;
56 gfx::ImageSkia right_image_; 59 gfx::ImageSkia right_image_;
57 60
58 InkDropButtonListener* listener_; 61 InkDropButtonListener* listener_;
59 WmShelf* wm_shelf_; 62 WmShelf* wm_shelf_;
60 63
64 // Alpha value used to paint the background.
65 int background_alpha_;
66
61 DISALLOW_COPY_AND_ASSIGN(OverflowButton); 67 DISALLOW_COPY_AND_ASSIGN(OverflowButton);
62 }; 68 };
63 69
64 } // namespace ash 70 } // namespace ash
65 71
66 #endif // ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ 72 #endif // ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/app_list_button.cc ('k') | ash/common/shelf/overflow_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698