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

Side by Side Diff: ui/app_list/views/app_list_item_view.h

Issue 466293002: Hardcode applist icon dimension and shadows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoops - left in a function dec Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 23 matching lines...) Expand all
34 class APP_LIST_EXPORT AppListItemView : public views::CustomButton, 34 class APP_LIST_EXPORT AppListItemView : public views::CustomButton,
35 public views::ContextMenuController, 35 public views::ContextMenuController,
36 public AppListItemObserver { 36 public AppListItemObserver {
37 public: 37 public:
38 // Internal class name. 38 // Internal class name.
39 static const char kViewClassName[]; 39 static const char kViewClassName[];
40 40
41 AppListItemView(AppsGridView* apps_grid_view, AppListItem* item); 41 AppListItemView(AppsGridView* apps_grid_view, AppListItem* item);
42 virtual ~AppListItemView(); 42 virtual ~AppListItemView();
43 43
44 void SetIconSize(const gfx::Size& size);
45
46 void Prerender(); 44 void Prerender();
47 45
48 void CancelContextMenu(); 46 void CancelContextMenu();
49 47
50 gfx::ImageSkia GetDragImage(); 48 gfx::ImageSkia GetDragImage();
51 void OnDragEnded(); 49 void OnDragEnded();
52 gfx::Point GetDragImageOffset(); 50 gfx::Point GetDragImageOffset();
53 51
54 void SetAsAttemptedFolderTarget(bool is_target_folder); 52 void SetAsAttemptedFolderTarget(bool is_target_folder);
55 53
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 130
133 AppListItem* item_; // Owned by AppListModel. 131 AppListItem* item_; // Owned by AppListModel.
134 132
135 AppsGridView* apps_grid_view_; // Owned by views hierarchy. 133 AppsGridView* apps_grid_view_; // Owned by views hierarchy.
136 views::ImageView* icon_; // Owned by views hierarchy. 134 views::ImageView* icon_; // Owned by views hierarchy.
137 CachedLabel* title_; // Owned by views hierarchy. 135 CachedLabel* title_; // Owned by views hierarchy.
138 ProgressBarView* progress_bar_; // Owned by views hierarchy. 136 ProgressBarView* progress_bar_; // Owned by views hierarchy.
139 137
140 scoped_ptr<views::MenuRunner> context_menu_runner_; 138 scoped_ptr<views::MenuRunner> context_menu_runner_;
141 139
142 gfx::Size icon_size_;
143 gfx::ShadowValues icon_shadows_;
144
145 UIState ui_state_; 140 UIState ui_state_;
146 141
147 // True if scroll gestures should contribute to dragging. 142 // True if scroll gestures should contribute to dragging.
148 bool touch_dragging_; 143 bool touch_dragging_;
149 144
150 // A timer to defer showing drag UI when mouse is pressed. 145 // A timer to defer showing drag UI when mouse is pressed.
151 base::OneShotTimer<AppListItemView> mouse_drag_timer_; 146 base::OneShotTimer<AppListItemView> mouse_drag_timer_;
152 147
153 DISALLOW_COPY_AND_ASSIGN(AppListItemView); 148 DISALLOW_COPY_AND_ASSIGN(AppListItemView);
154 }; 149 };
155 150
156 } // namespace app_list 151 } // namespace app_list
157 152
158 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 153 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698