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

Unified Diff: ash/app_list/app_list_item_view.h

Issue 10388032: Move app list from ash to ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix win_aura bot and comments in #5 Created 8 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 | « ash/app_list/app_list_item_model_observer.h ('k') | ash/app_list/app_list_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list_item_view.h
===================================================================
--- ash/app_list/app_list_item_view.h (revision 135932)
+++ ash/app_list/app_list_item_view.h (working copy)
@@ -1,110 +0,0 @@
-// 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.
-
-#ifndef ASH_APP_LIST_APP_LIST_ITEM_VIEW_H_
-#define ASH_APP_LIST_APP_LIST_ITEM_VIEW_H_
-#pragma once
-
-#include "ash/app_list/app_list_item_model_observer.h"
-#include "ash/ash_export.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/views/context_menu_controller.h"
-#include "ui/views/controls/button/custom_button.h"
-
-class SkBitmap;
-
-namespace views {
-class ImageView;
-class MenuRunner;
-}
-
-namespace ash {
-
-class AppListItemModel;
-class AppListModelView;
-class DropShadowLabel;
-
-class ASH_EXPORT AppListItemView : public views::CustomButton,
- public views::ContextMenuController,
- public AppListItemModelObserver {
- public:
- AppListItemView(AppListModelView* list_model_view,
- AppListItemModel* model,
- views::ButtonListener* listener);
- virtual ~AppListItemView();
-
- static gfx::Size GetPreferredSizeForIconSize(const gfx::Size& icon_size);
-
- // For testing. Testing calls this function to set minimum title width in
- // pixels to get rid dependency on default font width.
- static void SetMinTitleWidth(int width);
-
- void SetSelected(bool selected);
- bool selected() const {
- return selected_;
- }
-
- void SetIconSize(const gfx::Size& size);
-
- AppListItemModel* model() const {
- return model_;
- }
-
- // Internal class name.
- static const char kViewClassName[];
-
- private:
- class IconOperation;
-
- // Get icon from model and schedule background processing.
- void UpdateIcon();
-
- // Cancel pending icon operation and reply callback.
- void CancelPendingIconOperation();
-
- // Reply callback from background shadow generation. |op| is the finished
- // operation and holds the result image.
- void ApplyShadow(scoped_refptr<IconOperation> op);
-
- // AppListItemModelObserver overrides:
- virtual void ItemIconChanged() OVERRIDE;
- virtual void ItemTitleChanged() OVERRIDE;
- virtual void ItemHighlightedChanged() OVERRIDE;
-
- // views::View overrides:
- virtual std::string GetClassName() const OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual void Layout() OVERRIDE;
- virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- // views::ContextMenuController overrides:
- virtual void ShowContextMenuForView(views::View* source,
- const gfx::Point& point) OVERRIDE;
-
- // views::CustomButton overrides:
- virtual void StateChanged() OVERRIDE;
-
- AppListItemModel* model_;
-
- AppListModelView* list_model_view_;
- views::ImageView* icon_;
- DropShadowLabel* title_;
-
- scoped_ptr<views::MenuRunner> context_menu_runner_;
-
- gfx::Size icon_size_;
- bool selected_;
-
- scoped_refptr<IconOperation> icon_op_;
- base::WeakPtrFactory<AppListItemView> apply_shadow_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListItemView);
-};
-
-} // namespace ash
-
-#endif // ASH_APP_LIST_APP_LIST_ITEM_VIEW_H_
« no previous file with comments | « ash/app_list/app_list_item_model_observer.h ('k') | ash/app_list/app_list_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698