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

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

Issue 2191153002: Revert of Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
27 private: 24 private:
28 // views::View: 25 // views::View:
29 void OnPaint(gfx::Canvas* canvas) override; 26 void OnPaint(gfx::Canvas* canvas) override;
30 27
31 // views::CustomButton: 28 // views::CustomButton:
32 void NotifyClick(const ui::Event& event) override; 29 void NotifyClick(const ui::Event& event) override;
33 30
34 // Helper functions to paint the background and foreground of the button 31 // Helper functions to paint the background and foreground of the button
35 // at |bounds|. 32 // at |bounds|.
36 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds); 33 void PaintBackground(gfx::Canvas* canvas, const gfx::Rect& bounds);
(...skipping 17 matching lines...) Expand all
54 gfx::ImageSkia bottom_image_md_; 51 gfx::ImageSkia bottom_image_md_;
55 52
56 // Cached rotations of |bottom_image_| used for left and right shelf 53 // Cached rotations of |bottom_image_| used for left and right shelf
57 // alignments. 54 // alignments.
58 gfx::ImageSkia left_image_; 55 gfx::ImageSkia left_image_;
59 gfx::ImageSkia right_image_; 56 gfx::ImageSkia right_image_;
60 57
61 InkDropButtonListener* listener_; 58 InkDropButtonListener* listener_;
62 WmShelf* wm_shelf_; 59 WmShelf* wm_shelf_;
63 60
64 // Alpha value used to paint the background.
65 int background_alpha_;
66
67 DISALLOW_COPY_AND_ASSIGN(OverflowButton); 61 DISALLOW_COPY_AND_ASSIGN(OverflowButton);
68 }; 62 };
69 63
70 } // namespace ash 64 } // namespace ash
71 65
72 #endif // ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ 66 #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