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

Unified Diff: ash/shelf/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/alternate_app_list_button.h ('k') | ash/shelf/app_list_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/app_list_button.h
diff --git a/ash/shelf/app_list_button.h b/ash/shelf/app_list_button.h
index c47fd6d51ce529a2dd8d23a9e9679a86ce7beed8..2571b717005918d3b0e4bea5b88583f1d2d4e189 100644
--- a/ash/shelf/app_list_button.h
+++ b/ash/shelf/app_list_button.h
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,18 +9,21 @@
namespace ash {
class ShelfButtonHost;
+class ShelfWidget;
// Button used for the AppList icon on the shelf.
class AppListButton : public views::ImageButton {
public:
- AppListButton(views::ButtonListener* listener, ShelfButtonHost* host);
- virtual ~AppListButton();
+ // Bounds size (inset) required for the app icon image (in pixels).
+ static const int kImageBoundsSize;
- void StartLoadingAnimation();
- void StopLoadingAnimation();
+ AppListButton(views::ButtonListener* listener,
+ ShelfButtonHost* host,
+ ShelfWidget* shelf_widget);
+ virtual ~AppListButton();
protected:
- // views::ImageButton:
+ // views::ImageButton overrides:
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseCaptureLost() OVERRIDE;
@@ -28,10 +31,17 @@ class AppListButton : public views::ImageButton {
virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
+ // ui::EventHandler overrides:
+ virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+
private:
ShelfButtonHost* host_;
+ // Reference to the shelf widget containing this button, owned by the
+ // root window controller.
+ ShelfWidget* shelf_widget_;
DISALLOW_COPY_AND_ASSIGN(AppListButton);
};
« no previous file with comments | « ash/shelf/alternate_app_list_button.h ('k') | ash/shelf/app_list_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698