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

Unified Diff: ash/launcher/launcher_view.cc

Issue 9703026: Makes the maximize/restore button handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 9 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/launcher/launcher_view.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ash/launcher/launcher_view.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698