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

Side by Side Diff: ash/wm/gestures/system_pinch_handler.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/gestures/shelf_gesture_handler.cc ('k') | ash/wm/panel_layout_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gestures/system_pinch_handler.h" 5 #include "ash/wm/gestures/system_pinch_handler.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/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (pinch_factor_ < kPinchThresholdForMinimize) { 129 if (pinch_factor_ < kPinchThresholdForMinimize) {
130 if (wm::IsWindowMaximized(window) || wm::IsWindowFullscreen(window)) { 130 if (wm::IsWindowMaximized(window) || wm::IsWindowFullscreen(window)) {
131 const gfx::Rect* restore = GetRestoreBoundsInScreen(window); 131 const gfx::Rect* restore = GetRestoreBoundsInScreen(window);
132 if (restore) { 132 if (restore) {
133 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; 133 phantom_state_ = PHANTOM_WINDOW_MINIMIZED;
134 return *restore; 134 return *restore;
135 } 135 }
136 return window->bounds(); 136 return window->bounds();
137 } 137 }
138 138
139 Launcher* launcher = Shell::GetInstance()->launcher(); 139 Launcher* launcher = Launcher::ForWindow(window);
140 gfx::Rect rect = launcher->GetScreenBoundsOfItemIconForWindow(target_); 140 gfx::Rect rect = launcher->GetScreenBoundsOfItemIconForWindow(target_);
141 if (rect.IsEmpty()) 141 if (rect.IsEmpty())
142 rect = launcher->widget()->GetWindowBoundsInScreen(); 142 rect = launcher->widget()->GetWindowBoundsInScreen();
143 else 143 else
144 rect.Inset(-8, -8); 144 rect.Inset(-8, -8);
145 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; 145 phantom_state_ = PHANTOM_WINDOW_MINIMIZED;
146 return rect; 146 return rect;
147 } 147 }
148 148
149 phantom_state_ = PHANTOM_WINDOW_NORMAL; 149 phantom_state_ = PHANTOM_WINDOW_NORMAL;
150 return window->bounds(); 150 return window->bounds();
151 } 151 }
152 152
153 } // namespace internal 153 } // namespace internal
154 } // namespace ash 154 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/gestures/shelf_gesture_handler.cc ('k') | ash/wm/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698