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_SHELF_OVERFLOW_BUTTON_H_ | 5 #ifndef ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ |
6 #define ASH_SHELF_OVERFLOW_BUTTON_H_ | 6 #define ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ |
7 | 7 |
8 #include "ash/common/shelf/shelf_types.h" | 8 #include "ash/common/shelf/shelf_types.h" |
msw
2016/07/19 19:14:07
nit: not needed.
James Cook
2016/07/19 19:25:13
Good catch. Done.
| |
9 #include "base/compiler_specific.h" | |
10 #include "base/macros.h" | 9 #include "base/macros.h" |
11 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
12 #include "ui/views/controls/button/custom_button.h" | 11 #include "ui/views/controls/button/custom_button.h" |
13 | 12 |
14 namespace ash { | 13 namespace ash { |
15 class InkDropButtonListener; | 14 class InkDropButtonListener; |
16 class Shelf; | 15 class WmShelf; |
17 | 16 |
18 // Shelf overflow chevron button. | 17 // Shelf overflow chevron button. |
19 class OverflowButton : public views::CustomButton { | 18 class OverflowButton : public views::CustomButton { |
20 public: | 19 public: |
21 OverflowButton(InkDropButtonListener* listener, Shelf* shelf); | 20 OverflowButton(InkDropButtonListener* listener, WmShelf* wm_shelf); |
22 ~OverflowButton() override; | 21 ~OverflowButton() override; |
23 | 22 |
24 void OnShelfAlignmentChanged(); | 23 void OnShelfAlignmentChanged(); |
25 | 24 |
26 private: | 25 private: |
27 // views::View: | 26 // views::View: |
28 void OnPaint(gfx::Canvas* canvas) override; | 27 void OnPaint(gfx::Canvas* canvas) override; |
29 | 28 |
30 // views::CustomButton: | 29 // views::CustomButton: |
31 void NotifyClick(const ui::Event& event) override; | 30 void NotifyClick(const ui::Event& event) override; |
(...skipping 19 matching lines...) Expand all Loading... | |
51 // enabled by default. See crbug.com/614453. | 50 // enabled by default. See crbug.com/614453. |
52 const gfx::ImageSkia* bottom_image_; | 51 const gfx::ImageSkia* bottom_image_; |
53 gfx::ImageSkia bottom_image_md_; | 52 gfx::ImageSkia bottom_image_md_; |
54 | 53 |
55 // Cached rotations of |bottom_image_| used for left and right shelf | 54 // Cached rotations of |bottom_image_| used for left and right shelf |
56 // alignments. | 55 // alignments. |
57 gfx::ImageSkia left_image_; | 56 gfx::ImageSkia left_image_; |
58 gfx::ImageSkia right_image_; | 57 gfx::ImageSkia right_image_; |
59 | 58 |
60 InkDropButtonListener* listener_; | 59 InkDropButtonListener* listener_; |
61 Shelf* shelf_; | 60 WmShelf* wm_shelf_; |
62 | 61 |
63 DISALLOW_COPY_AND_ASSIGN(OverflowButton); | 62 DISALLOW_COPY_AND_ASSIGN(OverflowButton); |
64 }; | 63 }; |
65 | 64 |
66 } // namespace ash | 65 } // namespace ash |
67 | 66 |
68 #endif // ASH_SHELF_OVERFLOW_BUTTON_H_ | 67 #endif // ASH_COMMON_SHELF_OVERFLOW_BUTTON_H_ |
OLD | NEW |