| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ui/app_list/app_list_folder_item.h" | 5 #include "ui/app_list/app_list_folder_item.h" |
| 6 | 6 |
| 7 #include "base/guid.h" |
| 7 #include "ui/app_list/app_list_constants.h" | 8 #include "ui/app_list/app_list_constants.h" |
| 8 #include "ui/app_list/app_list_item_list.h" | 9 #include "ui/app_list/app_list_item_list.h" |
| 9 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
| 10 #include "ui/gfx/image/canvas_image_source.h" | 11 #include "ui/gfx/image/canvas_image_source.h" |
| 11 #include "ui/gfx/image/image_skia_operations.h" | 12 #include "ui/gfx/image/image_skia_operations.h" |
| 12 | 13 |
| 13 namespace app_list { | 14 namespace app_list { |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 top_icon_bounds.push_back(bottom_left); | 138 top_icon_bounds.push_back(bottom_left); |
| 138 | 139 |
| 139 // Get the bottom right icon bounds. | 140 // Get the bottom right icon bounds. |
| 140 gfx::Rect bottom_right( | 141 gfx::Rect bottom_right( |
| 141 right_x, bottom_y, kItemIconDimension, kItemIconDimension); | 142 right_x, bottom_y, kItemIconDimension, kItemIconDimension); |
| 142 top_icon_bounds.push_back(bottom_right); | 143 top_icon_bounds.push_back(bottom_right); |
| 143 | 144 |
| 144 return top_icon_bounds; | 145 return top_icon_bounds; |
| 145 } | 146 } |
| 146 | 147 |
| 148 std::string AppListFolderItem::GenerateId() { |
| 149 return base::GenerateGUID(); |
| 150 } |
| 151 |
| 147 const char* AppListFolderItem::GetItemType() const { | 152 const char* AppListFolderItem::GetItemType() const { |
| 148 return AppListFolderItem::kItemType; | 153 return AppListFolderItem::kItemType; |
| 149 } | 154 } |
| 150 | 155 |
| 151 ui::MenuModel* AppListFolderItem::GetContextMenuModel() { | 156 ui::MenuModel* AppListFolderItem::GetContextMenuModel() { |
| 152 // TODO(stevenjb/jennyz): Implement. | 157 // TODO(stevenjb/jennyz): Implement. |
| 153 return NULL; | 158 return NULL; |
| 154 } | 159 } |
| 155 | 160 |
| 156 void AppListFolderItem::ItemIconChanged() { | 161 void AppListFolderItem::ItemIconChanged() { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 for (size_t i = 0; | 201 for (size_t i = 0; |
| 197 i < kNumFolderTopItems && i < item_list_->item_count(); ++i) { | 202 i < kNumFolderTopItems && i < item_list_->item_count(); ++i) { |
| 198 AppListItem* item = item_list_->item_at(i); | 203 AppListItem* item = item_list_->item_at(i); |
| 199 item->AddObserver(this); | 204 item->AddObserver(this); |
| 200 top_items_.push_back(item); | 205 top_items_.push_back(item); |
| 201 } | 206 } |
| 202 UpdateIcon(); | 207 UpdateIcon(); |
| 203 } | 208 } |
| 204 | 209 |
| 205 } // namespace app_list | 210 } // namespace app_list |
| OLD | NEW |