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

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

Issue 57453002: ash: Rename LauncherButtonHost to ShelfButtonHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_button_host.h ('k') | ash/shelf/alternate_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 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_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
12 class ShelfWidget; 12 class ShelfWidget;
13 13
14 namespace internal { 14 namespace internal {
15 15
16 class LauncherButtonHost; 16 class ShelfButtonHost;
17 17
18 // Button used for the AppList icon on the launcher. 18 // Button used for the AppList icon on the shelf.
19 // This class is an alternate implementation to 19 // This class is an alternate implementation to ash::internal::AppListButton
20 // ash::internal::AppListButton for the purposes of testing an 20 // for the purposes of testing an alternate shelf layout
21 // alternate shelf layout (see ash_switches: UseAlternateShelfLayout). 21 // (see ash_switches: UseAlternateShelfLayout).
22 class AlternateAppListButton : public views::ImageButton { 22 class AlternateAppListButton : public views::ImageButton {
23 public: 23 public:
24 // Bounds size (inset) required for the app icon image (in pixels). 24 // Bounds size (inset) required for the app icon image (in pixels).
25 static const int kImageBoundsSize; 25 static const int kImageBoundsSize;
26 26
27 AlternateAppListButton(views::ButtonListener* listener, 27 AlternateAppListButton(views::ButtonListener* listener,
28 LauncherButtonHost* host, 28 ShelfButtonHost* host,
29 ShelfWidget* shelf_widget); 29 ShelfWidget* shelf_widget);
30 virtual ~AlternateAppListButton(); 30 virtual ~AlternateAppListButton();
31 31
32 protected: 32 protected:
33 // views::ImageButton overrides: 33 // views::ImageButton overrides:
34 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 34 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
35 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 35 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
36 virtual void OnMouseCaptureLost() OVERRIDE; 36 virtual void OnMouseCaptureLost() OVERRIDE;
37 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; 37 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
38 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; 38 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
39 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 39 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
40 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 40 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
42 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 42 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
43 43
44 // ui::EventHandler overrides: 44 // ui::EventHandler overrides:
45 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 45 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
46 46
47 private: 47 private:
48 LauncherButtonHost* host_; 48 ShelfButtonHost* host_;
49 // Reference to the shelf widget containing this button, owned by the 49 // Reference to the shelf widget containing this button, owned by the
50 // root window controller. 50 // root window controller.
51 ShelfWidget* shelf_widget_; 51 ShelfWidget* shelf_widget_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton); 53 DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton);
54 }; 54 };
55 55
56 } // namespace internal 56 } // namespace internal
57 } // namespace ash 57 } // namespace ash
58 58
59 #endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_ 59 #endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button_host.h ('k') | ash/shelf/alternate_app_list_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698