| 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_APP_LIST_BUTTON_H_ | 5 #ifndef ASH_SHELF_APP_LIST_BUTTON_H_ |
| 6 #define ASH_SHELF_APP_LIST_BUTTON_H_ | 6 #define ASH_SHELF_APP_LIST_BUTTON_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
| 13 #include "ui/views/controls/button/image_button.h" | 13 #include "ui/views/controls/button/image_button.h" |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 class InkDropButtonListener; | 16 class InkDropButtonListener; |
| 17 class Shelf; |
| 17 class ShelfView; | 18 class ShelfView; |
| 18 class WmShelf; | |
| 19 | 19 |
| 20 // Button used for the AppList icon on the shelf. | 20 // Button used for the AppList icon on the shelf. |
| 21 class ASH_EXPORT AppListButton : public views::ImageButton { | 21 class ASH_EXPORT AppListButton : public views::ImageButton { |
| 22 public: | 22 public: |
| 23 AppListButton(InkDropButtonListener* listener, | 23 AppListButton(InkDropButtonListener* listener, |
| 24 ShelfView* shelf_view, | 24 ShelfView* shelf_view, |
| 25 WmShelf* wm_shelf); | 25 Shelf* shelf); |
| 26 ~AppListButton() override; | 26 ~AppListButton() override; |
| 27 | 27 |
| 28 void OnAppListShown(); | 28 void OnAppListShown(); |
| 29 void OnAppListDismissed(); | 29 void OnAppListDismissed(); |
| 30 | 30 |
| 31 bool is_showing_app_list() const { return is_showing_app_list_; } | 31 bool is_showing_app_list() const { return is_showing_app_list_; } |
| 32 | 32 |
| 33 // Updates background and schedules a paint. | 33 // Updates background and schedules a paint. |
| 34 void UpdateShelfItemBackground(SkColor color); | 34 void UpdateShelfItemBackground(SkColor color); |
| 35 | 35 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 57 | 57 |
| 58 // True if the app list is currently showing for this display. | 58 // True if the app list is currently showing for this display. |
| 59 // This is useful because other IsApplistVisible functions aren't per-display. | 59 // This is useful because other IsApplistVisible functions aren't per-display. |
| 60 bool is_showing_app_list_; | 60 bool is_showing_app_list_; |
| 61 | 61 |
| 62 // Color used to paint the background. | 62 // Color used to paint the background. |
| 63 SkColor background_color_; | 63 SkColor background_color_; |
| 64 | 64 |
| 65 InkDropButtonListener* listener_; | 65 InkDropButtonListener* listener_; |
| 66 ShelfView* shelf_view_; | 66 ShelfView* shelf_view_; |
| 67 WmShelf* wm_shelf_; | 67 Shelf* shelf_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(AppListButton); | 69 DISALLOW_COPY_AND_ASSIGN(AppListButton); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace ash | 72 } // namespace ash |
| 73 | 73 |
| 74 #endif // ASH_SHELF_APP_LIST_BUTTON_H_ | 74 #endif // ASH_SHELF_APP_LIST_BUTTON_H_ |
| OLD | NEW |