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

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

Issue 2169533002: mash: Migrate shelf app list button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/DEPS ('k') | ash/common/shelf/app_list_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 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_COMMON_SHELF_APP_LIST_BUTTON_H_
6 #define ASH_SHELF_APP_LIST_BUTTON_H_ 6 #define ASH_COMMON_SHELF_APP_LIST_BUTTON_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/controls/button/image_button.h" 10 #include "ui/views/controls/button/image_button.h"
11 11
12 namespace ash { 12 namespace ash {
13 class InkDropButtonListener; 13 class InkDropButtonListener;
14 class ShelfView; 14 class ShelfView;
15 class WmShelf;
15 16
16 // Button used for the AppList icon on the shelf. 17 // Button used for the AppList icon on the shelf.
17 class ASH_EXPORT AppListButton : public views::ImageButton { 18 class ASH_EXPORT AppListButton : public views::ImageButton {
18 public: 19 public:
19 explicit AppListButton(InkDropButtonListener* listener, 20 AppListButton(InkDropButtonListener* listener,
20 ShelfView* shelf_view); 21 ShelfView* shelf_view,
22 WmShelf* wm_shelf);
21 ~AppListButton() override; 23 ~AppListButton() override;
22 24
23 void OnAppListShown(); 25 void OnAppListShown();
24 void OnAppListDismissed(); 26 void OnAppListDismissed();
25 27
26 bool draw_background_as_active() { return draw_background_as_active_; } 28 bool draw_background_as_active() { return draw_background_as_active_; }
27 29
28 protected: 30 protected:
29 // views::ImageButton overrides: 31 // views::ImageButton overrides:
30 bool OnMousePressed(const ui::MouseEvent& event) override; 32 bool OnMousePressed(const ui::MouseEvent& event) override;
(...skipping 23 matching lines...) Expand all
54 // Helper function to paint the AppList button in Chrome OS non-MD. 56 // Helper function to paint the AppList button in Chrome OS non-MD.
55 void PaintAppListButton(gfx::Canvas* canvas, 57 void PaintAppListButton(gfx::Canvas* canvas,
56 const gfx::ImageSkia& foreground_image); 58 const gfx::ImageSkia& foreground_image);
57 59
58 // True if the background should render as active, regardless of the state of 60 // True if the background should render as active, regardless of the state of
59 // the application list. 61 // the application list.
60 bool draw_background_as_active_; 62 bool draw_background_as_active_;
61 63
62 InkDropButtonListener* listener_; 64 InkDropButtonListener* listener_;
63 ShelfView* shelf_view_; 65 ShelfView* shelf_view_;
66 WmShelf* wm_shelf_;
64 67
65 DISALLOW_COPY_AND_ASSIGN(AppListButton); 68 DISALLOW_COPY_AND_ASSIGN(AppListButton);
66 }; 69 };
67 70
68 } // namespace ash 71 } // namespace ash
69 72
70 #endif // ASH_SHELF_APP_LIST_BUTTON_H_ 73 #endif // ASH_COMMON_SHELF_APP_LIST_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/DEPS ('k') | ash/common/shelf/app_list_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698