| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/mus/screenlock_layout.h" | 5 #include "ash/mus/screenlock_layout.h" |
| 6 | 6 |
| 7 #include "ash/mus/property_util.h" | 7 #include "ash/mus/property_util.h" |
| 8 #include "components/mus/public/cpp/property_type_converters.h" | 8 #include "services/ui/public/cpp/property_type_converters.h" |
| 9 #include "components/mus/public/cpp/window.h" | 9 #include "services/ui/public/cpp/window.h" |
| 10 #include "components/mus/public/cpp/window_property.h" | 10 #include "services/ui/public/cpp/window_property.h" |
| 11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 namespace mus { | 14 namespace mus { |
| 15 | 15 |
| 16 ScreenlockLayout::ScreenlockLayout(::mus::Window* owner) | 16 ScreenlockLayout::ScreenlockLayout(::mus::Window* owner) |
| 17 : LayoutManager(owner) {} | 17 : LayoutManager(owner) {} |
| 18 ScreenlockLayout::~ScreenlockLayout() {} | 18 ScreenlockLayout::~ScreenlockLayout() {} |
| 19 | 19 |
| 20 // We explicitly don't make assertions about the number of children in this | 20 // We explicitly don't make assertions about the number of children in this |
| 21 // layout as the number of children can vary when the application providing the | 21 // layout as the number of children can vary when the application providing the |
| 22 // screenlock restarts. | 22 // screenlock restarts. |
| 23 | 23 |
| 24 void ScreenlockLayout::LayoutWindow(::mus::Window* window) { | 24 void ScreenlockLayout::LayoutWindow(::mus::Window* window) { |
| 25 gfx::Rect bounds = owner()->bounds(); | 25 gfx::Rect bounds = owner()->bounds(); |
| 26 bounds.Inset(-25, -25); | 26 bounds.Inset(-25, -25); |
| 27 window->SetBounds(bounds); | 27 window->SetBounds(bounds); |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace mus | 30 } // namespace mus |
| 31 } // namespace ash | 31 } // namespace ash |
| OLD | NEW |