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/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
6 | 6 |
7 #include "ash/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
8 #include "ash/public/cpp/window_properties.h" | 8 #include "ash/public/cpp/window_properties.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/wm/panels/panel_layout_manager.h" | 12 #include "ash/wm/panels/panel_layout_manager.h" |
13 #include "ash/wm/window_parenting_utils.h" | 13 #include "ash/wm/window_parenting_utils.h" |
14 #include "ash/wm/window_state.h" | 14 #include "ash/wm/window_state.h" |
15 #include "ash/wm_window.h" | |
16 #include "ui/aura/client/window_parenting_client.h" | 15 #include "ui/aura/client/window_parenting_client.h" |
17 #include "ui/base/hit_test.h" | 16 #include "ui/base/hit_test.h" |
18 #include "ui/base/ui_base_types.h" | 17 #include "ui/base/ui_base_types.h" |
19 #include "ui/display/display.h" | 18 #include "ui/display/display.h" |
20 #include "ui/display/screen.h" | 19 #include "ui/display/screen.h" |
21 #include "ui/wm/core/coordinate_conversion.h" | 20 #include "ui/wm/core/coordinate_conversion.h" |
22 | 21 |
23 namespace ash { | 22 namespace ash { |
24 | 23 |
25 namespace { | 24 namespace { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // but then canceled the drag we may need to inform the original layout | 191 // but then canceled the drag we may need to inform the original layout |
193 // manager that the drag is finished. | 192 // manager that the drag is finished. |
194 if (initial_panel_container_ != panel_container_) | 193 if (initial_panel_container_ != panel_container_) |
195 PanelLayoutManager::Get(initial_panel_container_)->FinishDragging(); | 194 PanelLayoutManager::Get(initial_panel_container_)->FinishDragging(); |
196 if (panel_container_) | 195 if (panel_container_) |
197 GetPanelLayoutManager()->FinishDragging(); | 196 GetPanelLayoutManager()->FinishDragging(); |
198 } | 197 } |
199 | 198 |
200 void PanelWindowResizer::UpdateLauncherPosition() { | 199 void PanelWindowResizer::UpdateLauncherPosition() { |
201 if (panel_container_) { | 200 if (panel_container_) { |
202 GetPanelLayoutManager()->shelf()->UpdateIconPositionForPanel( | 201 GetPanelLayoutManager()->shelf()->UpdateIconPositionForPanel(GetTarget()); |
203 WmWindow::Get(GetTarget())); | |
204 } | 202 } |
205 } | 203 } |
206 | 204 |
207 PanelLayoutManager* PanelWindowResizer::GetPanelLayoutManager() { | 205 PanelLayoutManager* PanelWindowResizer::GetPanelLayoutManager() { |
208 return PanelLayoutManager::Get(panel_container_); | 206 return PanelLayoutManager::Get(panel_container_); |
209 } | 207 } |
210 | 208 |
211 } // namespace ash | 209 } // namespace ash |
OLD | NEW |