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

Unified Diff: ash/app_list/app_list_item_view.h

Issue 9559005: aura: Implement app list M19 mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
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..ee26c33d28baa11c5364f39ebd4906723c970547 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 kPadding = 5;
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_;

Powered by Google App Engine
This is Rietveld 408576698