| Index: ash/app_list/app_list_item_view.h
|
| diff --git a/ash/app_list/app_list_item_view.h b/ash/app_list/app_list_item_view.h
|
| index 120d97cbd8b34b864f26a6171284b8709b63de4d..039199ae71e250108618b5a86c21a1c8f81b03c3 100644
|
| --- a/ash/app_list/app_list_item_view.h
|
| +++ b/ash/app_list/app_list_item_view.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 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.
|
|
|
| @@ -8,7 +8,7 @@
|
|
|
| #include "ash/app_list/app_list_item_model_observer.h"
|
| #include "ash/ash_export.h"
|
| -#include "ui/views/view.h"
|
| +#include "ui/views/controls/button/custom_button.h"
|
|
|
| class SkBitmap;
|
|
|
| @@ -20,29 +20,22 @@ class Label;
|
| namespace ash {
|
|
|
| class AppListItemModel;
|
| -class AppListItemViewListener;
|
|
|
| -class ASH_EXPORT AppListItemView : public views::View,
|
| - public AppListItemModelObserver {
|
| +class ASH_EXPORT AppListItemView : public views::CustomButton,
|
| + public AppListItemModelObserver {
|
| public:
|
| AppListItemView(AppListItemModel* model,
|
| - AppListItemViewListener* listener);
|
| + views::ButtonListener* listener);
|
| virtual ~AppListItemView();
|
|
|
| AppListItemModel* model() const {
|
| return model_;
|
| }
|
|
|
| - // Tile size
|
| - static const int kTileSize = 180;
|
| -
|
| - // Preferred icon size.
|
| - static const int kIconSize = 128;
|
| + // Icon padding
|
| + static const int kIconPadding = 6;
|
|
|
| protected:
|
| - // Notifies listener when activated.
|
| - void NotifyActivated(int event_flags);
|
| -
|
| // AppListItemModelObserver overrides:
|
| virtual void ItemIconChanged() OVERRIDE;
|
| virtual void ItemTitleChanged() OVERRIDE;
|
| @@ -50,16 +43,10 @@ class ASH_EXPORT AppListItemView : public views::View,
|
| // views::View overrides:
|
| virtual gfx::Size GetPreferredSize() OVERRIDE;
|
| virtual void Layout() OVERRIDE;
|
| - virtual void OnFocus() OVERRIDE;
|
| - virtual void OnBlur() OVERRIDE;
|
| - virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
|
| - virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
|
| - virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
|
| - virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
|
| + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
|
|
|
| private:
|
| AppListItemModel* model_;
|
| - AppListItemViewListener* listener_;
|
|
|
| views::ImageView* icon_;
|
| views::Label* title_;
|
|
|