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

Unified Diff: ash/wm/workspace/frame_maximize_button.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/wm/window_animations.cc ('k') | ash/wm/workspace/workspace_layout_manager2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 76415d05738331cd4c6726d424ece968ed645f11..23192407314edcb8251dec3ed11e882e841151a9 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -477,7 +477,10 @@ gfx::Rect FrameMaximizeButton::ScreenBoundsForType(
window->parent(),
ScreenAsh::GetMaximizedWindowBoundsInParent(window));
case SNAP_MINIMIZE: {
- Launcher* launcher = Shell::GetInstance()->launcher();
+ Launcher* launcher = Launcher::ForWindow(window);
+ // Launcher is created lazily and can be NULL.
+ if (!launcher)
+ return gfx::Rect();
gfx::Rect item_rect(launcher->GetScreenBoundsOfItemIconForWindow(
window));
if (!item_rect.IsEmpty()) {
« no previous file with comments | « ash/wm/window_animations.cc ('k') | ash/wm/workspace/workspace_layout_manager2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698