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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/workspace/frame_maximize_button.h" 5 #include "ash/wm/workspace/frame_maximize_button.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/maximize_bubble_controller.h" 10 #include "ash/wm/maximize_bubble_controller.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 case SNAP_LEFT: 470 case SNAP_LEFT:
471 case SNAP_RIGHT: 471 case SNAP_RIGHT:
472 return ScreenAsh::ConvertRectToScreen( 472 return ScreenAsh::ConvertRectToScreen(
473 frame_->GetWidget()->GetNativeView()->parent(), 473 frame_->GetWidget()->GetNativeView()->parent(),
474 snap_sizer.target_bounds()); 474 snap_sizer.target_bounds());
475 case SNAP_MAXIMIZE: 475 case SNAP_MAXIMIZE:
476 return ScreenAsh::ConvertRectToScreen( 476 return ScreenAsh::ConvertRectToScreen(
477 window->parent(), 477 window->parent(),
478 ScreenAsh::GetMaximizedWindowBoundsInParent(window)); 478 ScreenAsh::GetMaximizedWindowBoundsInParent(window));
479 case SNAP_MINIMIZE: { 479 case SNAP_MINIMIZE: {
480 Launcher* launcher = Shell::GetInstance()->launcher(); 480 Launcher* launcher = Launcher::ForWindow(window);
sky 2012/10/17 16:25:20 null check launcher.
oshima 2012/10/17 17:49:43 same q
481 gfx::Rect item_rect(launcher->GetScreenBoundsOfItemIconForWindow( 481 gfx::Rect item_rect(launcher->GetScreenBoundsOfItemIconForWindow(
482 window)); 482 window));
483 if (!item_rect.IsEmpty()) { 483 if (!item_rect.IsEmpty()) {
484 // PhantomWindowController insets slightly, outset it so the phantom 484 // PhantomWindowController insets slightly, outset it so the phantom
485 // doesn't appear inset. 485 // doesn't appear inset.
486 item_rect.Inset(-8, -8); 486 item_rect.Inset(-8, -8);
487 return item_rect; 487 return item_rect;
488 } 488 }
489 return launcher->widget()->GetWindowBoundsInScreen(); 489 return launcher->widget()->GetWindowBoundsInScreen();
490 } 490 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 return FRAME_STATE_SNAP_LEFT; 574 return FRAME_STATE_SNAP_LEFT;
575 if (bounds.right() == screen.right()) 575 if (bounds.right() == screen.right())
576 return FRAME_STATE_SNAP_RIGHT; 576 return FRAME_STATE_SNAP_RIGHT;
577 // If we come here, it is likely caused by the fact that the 577 // If we come here, it is likely caused by the fact that the
578 // "VerticalResizeDoubleClick" stored a restore rectangle. In that case 578 // "VerticalResizeDoubleClick" stored a restore rectangle. In that case
579 // we allow all maximize operations (and keep the restore rectangle). 579 // we allow all maximize operations (and keep the restore rectangle).
580 return FRAME_STATE_NONE; 580 return FRAME_STATE_NONE;
581 } 581 }
582 582
583 } // namespace ash 583 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698