Chromium Code Reviews| 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/window_util.h" | 5 #include "ash/wm/window_util.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "ash/shell_window_ids.h" | |
| 12 #include "ash/snap_to_pixel_layout_manager.h" | 13 #include "ash/snap_to_pixel_layout_manager.h" |
| 13 #include "ash/wm/window_properties.h" | 14 #include "ash/wm/window_properties.h" |
| 14 #include "ash/wm/window_state.h" | 15 #include "ash/wm/window_state.h" |
| 15 #include "ash/wm/wm_event.h" | 16 #include "ash/wm/wm_event.h" |
| 16 #include "ui/aura/client/aura_constants.h" | 17 #include "ui/aura/client/aura_constants.h" |
| 17 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 18 #include "ui/aura/window_delegate.h" | 19 #include "ui/aura/window_delegate.h" |
| 19 #include "ui/aura/window_event_dispatcher.h" | 20 #include "ui/aura/window_event_dispatcher.h" |
| 20 #include "ui/compositor/dip_util.h" | 21 #include "ui/compositor/dip_util.h" |
| 21 #include "ui/gfx/display.h" | 22 #include "ui/gfx/display.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 continue; | 200 continue; |
| 200 if (container->GetProperty(kSnapChildrenToPixelBoundary)) { | 201 if (container->GetProperty(kSnapChildrenToPixelBoundary)) { |
| 201 if (!container->layout_manager()) | 202 if (!container->layout_manager()) |
| 202 container->SetLayoutManager(new SnapToPixelLayoutManager(container)); | 203 container->SetLayoutManager(new SnapToPixelLayoutManager(container)); |
| 203 } else { | 204 } else { |
| 204 InstallSnapLayoutManagerToContainers(container); | 205 InstallSnapLayoutManagerToContainers(container); |
| 205 } | 206 } |
| 206 } | 207 } |
| 207 } | 208 } |
| 208 | 209 |
| 210 void DockWindow(aura::Window* window) { | |
|
varkha
2014/09/29 21:04:35
This could be used in a few places now where we ca
dtapuska
2014/09/30 14:40:50
Done.
| |
| 211 aura::Window* docked_container = Shell::GetContainer( | |
| 212 window->GetRootWindow(), | |
| 213 kShellWindowId_DockedContainer); | |
| 214 wm::ReparentChildWithTransientChildren(window, | |
| 215 window->parent(), | |
| 216 docked_container); | |
| 217 } | |
| 218 | |
| 209 } // namespace wm | 219 } // namespace wm |
| 210 } // namespace ash | 220 } // namespace ash |
| OLD | NEW |