diff options
author | harrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 02:57:56 +0000 |
---|---|---|
committer | harrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 02:57:56 +0000 |
commit | 0ac231118b5ffa2ca76423c1ecc10ca47327596f (patch) | |
tree | fd7503398048811b348ea3b820e7600ada9946f3 /ash/shelf/app_list_button.h | |
parent | 7177c4325ff6804e53ae62399a48e7af7b04abec (diff) | |
download | chromium_src-0ac231118b5ffa2ca76423c1ecc10ca47327596f.zip chromium_src-0ac231118b5ffa2ca76423c1ecc10ca47327596f.tar.gz chromium_src-0ac231118b5ffa2ca76423c1ecc10ca47327596f.tar.bz2 |
Shelf Cleanup AlternateShelfLayout P1 Attempt 3
R=skuhne@chromium.org
TBR=jamescook@chromium.org, miket@chromium.org, skuhne@chromium.org
BUG=338429
re-landing of https://codereview.chromium.org/176883022/ with fix for the inset of app panel as discussed offline /w jennyz@
Review URL: https://codereview.chromium.org/229453005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf/app_list_button.h')
-rw-r--r-- | ash/shelf/app_list_button.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/ash/shelf/app_list_button.h b/ash/shelf/app_list_button.h index c47fd6d..2571b71 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); }; |