Index: ash/launcher/launcher_view.cc |
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc |
index 1dd9ca7dd0748cd0fe3e098b12647786f098e33d..b475710b9081fb596bb9a88fcc4987c3d6f7709c 100644 |
--- a/ash/launcher/launcher_view.cc |
+++ b/ash/launcher/launcher_view.cc |
@@ -260,6 +260,20 @@ void LauncherView::Init() { |
// We'll layout when our bounds change. |
} |
+gfx::Rect LauncherView::GetIdealBoundsOfItemIcon(LauncherID id) { |
+ int index = model_->ItemIndexByID(id); |
+ if (index == -1 || !view_model_->view_at(index)->visible()) |
+ return gfx::Rect(); |
+ const gfx::Rect& ideal_bounds(view_model_->ideal_bounds(index)); |
+ DCHECK_NE(TYPE_APP_LIST, model_->items()[index].type); |
+ LauncherButton* button = |
+ static_cast<LauncherButton*>(view_model_->view_at(index)); |
+ gfx::Rect icon_bounds = button->GetIconBounds(); |
+ return gfx::Rect(ideal_bounds.x() + icon_bounds.x(), |
+ ideal_bounds.y() + icon_bounds.y(), |
+ icon_bounds.width(), icon_bounds.height()); |
+} |
+ |
void LauncherView::LayoutToIdealBounds() { |
IdealBounds ideal_bounds; |
CalculateIdealBounds(&ideal_bounds); |