OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ALTERNATE_APP_LIST_BUTTON_H_ | 5 #ifndef ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ |
6 #define ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ | 6 #define ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ |
7 | 7 |
8 #include "ui/views/controls/button/image_button.h" | 8 #include "ui/views/controls/button/image_button.h" |
9 | 9 |
10 namespace ash { | 10 namespace ash { |
11 | 11 class ShelfButtonHost; |
12 class ShelfWidget; | 12 class ShelfWidget; |
13 | 13 |
14 namespace internal { | |
15 | |
16 class ShelfButtonHost; | |
17 | |
18 // Button used for the AppList icon on the shelf. | 14 // Button used for the AppList icon on the shelf. |
19 // This class is an alternate implementation to ash::internal::AppListButton | 15 // This class is an alternate implementation to ash::AppListButton |
20 // for the purposes of testing an alternate shelf layout | 16 // for the purposes of testing an alternate shelf layout |
21 // (see ash_switches: UseAlternateShelfLayout). | 17 // (see ash_switches: UseAlternateShelfLayout). |
22 class AlternateAppListButton : public views::ImageButton { | 18 class AlternateAppListButton : public views::ImageButton { |
23 public: | 19 public: |
24 // Bounds size (inset) required for the app icon image (in pixels). | 20 // Bounds size (inset) required for the app icon image (in pixels). |
25 static const int kImageBoundsSize; | 21 static const int kImageBoundsSize; |
26 | 22 |
27 AlternateAppListButton(views::ButtonListener* listener, | 23 AlternateAppListButton(views::ButtonListener* listener, |
28 ShelfButtonHost* host, | 24 ShelfButtonHost* host, |
29 ShelfWidget* shelf_widget); | 25 ShelfWidget* shelf_widget); |
(...skipping 16 matching lines...) Expand all Loading... |
46 | 42 |
47 private: | 43 private: |
48 ShelfButtonHost* host_; | 44 ShelfButtonHost* host_; |
49 // Reference to the shelf widget containing this button, owned by the | 45 // Reference to the shelf widget containing this button, owned by the |
50 // root window controller. | 46 // root window controller. |
51 ShelfWidget* shelf_widget_; | 47 ShelfWidget* shelf_widget_; |
52 | 48 |
53 DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton); | 49 DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton); |
54 }; | 50 }; |
55 | 51 |
56 } // namespace internal | |
57 } // namespace ash | 52 } // namespace ash |
58 | 53 |
59 #endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ | 54 #endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ |
OLD | NEW |