Commit 423ebdc6 authored by mgiuca's avatar mgiuca Committed by Commit bot

FolderImage: Const correctness.

BUG=425444

Review URL: https://codereview.chromium.org/953743003

Cr-Commit-Position: refs/heads/master@{#317991}
parent 6ac3fe57
......@@ -132,7 +132,7 @@ void FolderImage::UpdateIcon() {
RedrawIconAndNotify();
}
const gfx::ImageSkia& FolderImage::GetTopIcon(size_t item_index) {
const gfx::ImageSkia& FolderImage::GetTopIcon(size_t item_index) const {
CHECK_LT(item_index, top_items_.size());
return top_items_[item_index]->icon();
}
......@@ -171,7 +171,7 @@ std::vector<gfx::Rect> FolderImage::GetTopIconsBounds(
gfx::Rect FolderImage::GetTargetIconRectInFolderForItem(
AppListItem* item,
const gfx::Rect& folder_icon_bounds) {
const gfx::Rect& folder_icon_bounds) const {
for (size_t i = 0; i < top_items_.size(); ++i) {
if (item->id() == top_items_[i]->id()) {
std::vector<gfx::Rect> rects = GetTopIconsBounds(folder_icon_bounds);
......
......@@ -47,7 +47,7 @@ class APP_LIST_EXPORT FolderImage : public AppListItemListObserver,
const gfx::ImageSkia& icon() const { return icon_; }
// Returns the icon of one of the top items with |item_index|.
const gfx::ImageSkia& GetTopIcon(size_t item_index);
const gfx::ImageSkia& GetTopIcon(size_t item_index) const;
// Calculates the top item icons' bounds inside |folder_icon_bounds|.
// Returns the bounds of top item icons in sequence of top left, top right,
......@@ -63,7 +63,7 @@ class APP_LIST_EXPORT FolderImage : public AppListItemListObserver,
// The Rect returned is in the same coordinates of |folder_icon_bounds|.
gfx::Rect GetTargetIconRectInFolderForItem(
AppListItem* item,
const gfx::Rect& folder_icon_bounds);
const gfx::Rect& folder_icon_bounds) const;
void AddObserver(FolderImageObserver* observer);
void RemoveObserver(FolderImageObserver* observer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment