| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/snap_to_pixel_layout_manager.h" | 5 #include "ash/snap_to_pixel_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/wm/window_properties.h" | 7 #include "ash/wm/window_properties.h" |
| 8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ash { |
| 12 | 12 |
| 13 SnapToPixelLayoutManager::SnapToPixelLayoutManager(aura::Window* container) { | 13 SnapToPixelLayoutManager::SnapToPixelLayoutManager(aura::Window* container) { |
| 14 DCHECK(container->GetProperty(kSnapChildrenToPixelBoundary)); |
| 14 } | 15 } |
| 15 | 16 |
| 16 SnapToPixelLayoutManager::~SnapToPixelLayoutManager() { | 17 SnapToPixelLayoutManager::~SnapToPixelLayoutManager() { |
| 17 } | 18 } |
| 18 | 19 |
| 19 void SnapToPixelLayoutManager::OnWindowResized() { | 20 void SnapToPixelLayoutManager::OnWindowResized() { |
| 20 } | 21 } |
| 21 | 22 |
| 22 void SnapToPixelLayoutManager::OnWindowAddedToLayout(aura::Window* child) { | 23 void SnapToPixelLayoutManager::OnWindowAddedToLayout(aura::Window* child) { |
| 23 } | 24 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 35 } | 36 } |
| 36 | 37 |
| 37 void SnapToPixelLayoutManager::SetChildBounds( | 38 void SnapToPixelLayoutManager::SetChildBounds( |
| 38 aura::Window* child, | 39 aura::Window* child, |
| 39 const gfx::Rect& requested_bounds) { | 40 const gfx::Rect& requested_bounds) { |
| 40 SetChildBoundsDirect(child, requested_bounds); | 41 SetChildBoundsDirect(child, requested_bounds); |
| 41 wm::SnapWindowToPixelBoundary(child); | 42 wm::SnapWindowToPixelBoundary(child); |
| 42 } | 43 } |
| 43 | 44 |
| 44 } // namespace ash | 45 } // namespace ash |
| OLD | NEW |