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

Unified Diff: ui/app_list/views/tile_item_view.h

Issue 297643002: Add tiles to the experimental app list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac test Created 6 years, 7 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 | « ui/app_list/views/start_page_view.cc ('k') | ui/app_list/views/tile_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/tile_item_view.h
diff --git a/ui/app_list/views/tile_item_view.h b/ui/app_list/views/tile_item_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e20b5df57e8c3c52783334dc41f8ac2ea751034
--- /dev/null
+++ b/ui/app_list/views/tile_item_view.h
@@ -0,0 +1,51 @@
+// 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.
+
+#ifndef UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_
+#define UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_
+
+#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/button/custom_button.h"
+
+namespace views {
+class ImageView;
+class Label;
+}
+
+namespace app_list {
+
+class AppListItem;
+
+// The view for a tile in the app list on the start/search page.
+class TileItemView : public views::CustomButton, public views::ButtonListener {
+ public:
+ TileItemView();
+ virtual ~TileItemView();
+
+ void SetAppListItem(AppListItem* item);
+
+ private:
+ class TileItemBackground;
+
+ // Overridden from views::View:
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
+
+ // Overridden from views::ButtonListener:
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
+ // Owned by the model provided by the AppListViewDelegate.
+ AppListItem* item_;
+
+ views::ImageView* icon_; // Owned by views hierarchy.
+ views::Label* title_; // Owned by views hierarchy.
+
+ TileItemBackground* background_;
+
+ DISALLOW_COPY_AND_ASSIGN(TileItemView);
+};
+
+} // namespace app_list
+
+#endif // UI_APP_LIST_VIEWS_TILE_ITEM_VIEW_H_
« no previous file with comments | « ui/app_list/views/start_page_view.cc ('k') | ui/app_list/views/tile_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698