| OLD | NEW |
| 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/shelf/shelf_widget.h" |
| 9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 10 #include "ash/wm/property_util.h" | 11 #include "ash/wm/property_util.h" |
| 11 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
| 12 #include "ash/wm/workspace/snap_sizer.h" | 13 #include "ash/wm/workspace/snap_sizer.h" |
| 13 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 14 #include "ui/base/events/event_constants.h" | 15 #include "ui/base/events/event_constants.h" |
| 15 #include "ui/base/gestures/gesture_types.h" | 16 #include "ui/base/gestures/gesture_types.h" |
| 16 #include "ui/compositor/scoped_layer_animation_settings.h" | 17 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 17 #include "ui/gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
| 18 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (restore) { | 125 if (restore) { |
| 125 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; | 126 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; |
| 126 return *restore; | 127 return *restore; |
| 127 } | 128 } |
| 128 return window->bounds(); | 129 return window->bounds(); |
| 129 } | 130 } |
| 130 | 131 |
| 131 Launcher* launcher = Launcher::ForWindow(window); | 132 Launcher* launcher = Launcher::ForWindow(window); |
| 132 gfx::Rect rect = launcher->GetScreenBoundsOfItemIconForWindow(target_); | 133 gfx::Rect rect = launcher->GetScreenBoundsOfItemIconForWindow(target_); |
| 133 if (rect.IsEmpty()) | 134 if (rect.IsEmpty()) |
| 134 rect = launcher->widget()->GetWindowBoundsInScreen(); | 135 rect = launcher->shelf_widget()->GetWindowBoundsInScreen(); |
| 135 else | 136 else |
| 136 rect.Inset(-8, -8); | 137 rect.Inset(-8, -8); |
| 137 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; | 138 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; |
| 138 return rect; | 139 return rect; |
| 139 } | 140 } |
| 140 | 141 |
| 141 phantom_state_ = PHANTOM_WINDOW_NORMAL; | 142 phantom_state_ = PHANTOM_WINDOW_NORMAL; |
| 142 return window->bounds(); | 143 return window->bounds(); |
| 143 } | 144 } |
| 144 | 145 |
| 145 } // namespace internal | 146 } // namespace internal |
| 146 } // namespace ash | 147 } // namespace ash |
| OLD | NEW |