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

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

Issue 2033553003: Add MD ink drop ripple to shelf app items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests Created 4 years, 6 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
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_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 "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/views/controls/button/image_button.h" 9 #include "ui/views/controls/button/image_button.h"
10 10
11 namespace ash { 11 namespace ash {
12 class ShelfView; 12 class ShelfView;
13 13
14 // Button used for the AppList icon on the shelf. 14 // Button used for the AppList icon on the shelf.
15 class AppListButton : public views::ImageButton { 15 class AppListButton : public views::ImageButton {
16 public: 16 public:
17 explicit AppListButton(ShelfView* shelf_view); 17 explicit AppListButton(ShelfView* shelf_view);
18 ~AppListButton() override; 18 ~AppListButton() override;
19 19
20 bool draw_background_as_active() { return draw_background_as_active_; } 20 bool draw_background_as_active() { return draw_background_as_active_; }
21 21
22 protected: 22 protected:
23 // views::ImageButton overrides: 23 // views::ImageButton overrides:
24 bool OnMousePressed(const ui::MouseEvent& event) override; 24 bool OnMousePressed(const ui::MouseEvent& event) override;
25 void OnMouseReleased(const ui::MouseEvent& event) override; 25 void OnMouseReleased(const ui::MouseEvent& event) override;
26 void OnMouseCaptureLost() override; 26 void OnMouseCaptureLost() override;
27 bool OnMouseDragged(const ui::MouseEvent& event) override; 27 bool OnMouseDragged(const ui::MouseEvent& event) override;
28 void OnPaint(gfx::Canvas* canvas) override; 28 void OnPaint(gfx::Canvas* canvas) override;
29 void GetAccessibleState(ui::AXViewState* state) override; 29 void GetAccessibleState(ui::AXViewState* state) override;
30 void NotifyClick(const ui::Event& event) override;
30 31
31 // ui::EventHandler overrides: 32 // ui::EventHandler overrides:
32 void OnGestureEvent(ui::GestureEvent* event) override; 33 void OnGestureEvent(ui::GestureEvent* event) override;
33 34
34 private: 35 private:
35 // Toggles the active state for painting the background and schedules a paint. 36 // Toggles the active state for painting the background and schedules a paint.
36 void SetDrawBackgroundAsActive(bool draw_background_as_active); 37 void SetDrawBackgroundAsActive(bool draw_background_as_active);
37 38
38 // True if the background should render as active, regardless of the state of 39 // True if the background should render as active, regardless of the state of
39 // the application list. 40 // the application list.
40 bool draw_background_as_active_; 41 bool draw_background_as_active_;
41 42
42 ShelfView* shelf_view_; 43 ShelfView* shelf_view_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(AppListButton); 45 DISALLOW_COPY_AND_ASSIGN(AppListButton);
45 }; 46 };
46 47
47 } // namespace ash 48 } // namespace ash
48 49
49 #endif // ASH_SHELF_APP_LIST_BUTTON_H_ 50 #endif // ASH_SHELF_APP_LIST_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/shelf/app_list_button.cc » ('j') | ash/shelf/overflow_button.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698