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

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

Issue 229453005: Shelf Cleanup AlternateShelfLayout P1 Attempt 3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/shelf/app_list_button.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
6 #define ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
7
8 #include "ui/views/controls/button/image_button.h"
9
10 namespace ash {
11 class ShelfButtonHost;
12 class ShelfWidget;
13
14 // Button used for the AppList icon on the shelf.
15 // This class is an alternate implementation to ash::AppListButton
16 // for the purposes of testing an alternate shelf layout
17 // (see ash_switches: UseAlternateShelfLayout).
18 class AlternateAppListButton : public views::ImageButton {
19 public:
20 // Bounds size (inset) required for the app icon image (in pixels).
21 static const int kImageBoundsSize;
22
23 AlternateAppListButton(views::ButtonListener* listener,
24 ShelfButtonHost* host,
25 ShelfWidget* shelf_widget);
26 virtual ~AlternateAppListButton();
27
28 protected:
29 // views::ImageButton overrides:
30 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
31 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
32 virtual void OnMouseCaptureLost() OVERRIDE;
33 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
34 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
35 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
36 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
37 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
38 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
39
40 // ui::EventHandler overrides:
41 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
42
43 private:
44 ShelfButtonHost* host_;
45 // Reference to the shelf widget containing this button, owned by the
46 // root window controller.
47 ShelfWidget* shelf_widget_;
48
49 DISALLOW_COPY_AND_ASSIGN(AlternateAppListButton);
50 };
51
52 } // namespace ash
53
54 #endif // ASH_SHELF_ALTERNATE_APP_LIST_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/shelf/app_list_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698