| Index: ash/wm/common/wm_snap_to_pixel_layout_manager.h
|
| diff --git a/ash/wm/common/wm_snap_to_pixel_layout_manager.h b/ash/wm/common/wm_snap_to_pixel_layout_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b5f865811b79a9889b258d614539519b3d5331fa
|
| --- /dev/null
|
| +++ b/ash/wm/common/wm_snap_to_pixel_layout_manager.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ASH_WM_COMMON_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
|
| +#define ASH_WM_COMMON_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
|
| +
|
| +#include "ash/ash_export.h"
|
| +#include "ash/wm/common/wm_layout_manager.h"
|
| +#include "base/macros.h"
|
| +
|
| +namespace ash {
|
| +namespace wm {
|
| +
|
| +// A layout manager that places children's layer at the physical pixel
|
| +// boundaries.
|
| +class ASH_EXPORT WmSnapToPixelLayoutManager : public WmLayoutManager {
|
| + public:
|
| + WmSnapToPixelLayoutManager();
|
| + ~WmSnapToPixelLayoutManager() override;
|
| +
|
| + protected:
|
| + // Overridden from aura::LayoutManager:
|
| + void OnWindowResized() override;
|
| + void OnWindowAddedToLayout(WmWindow* child) override;
|
| + void OnWillRemoveWindowFromLayout(WmWindow* child) override;
|
| + void OnWindowRemovedFromLayout(WmWindow* child) override;
|
| + void OnChildWindowVisibilityChanged(WmWindow* child, bool visibile) override;
|
| + void SetChildBounds(WmWindow* child,
|
| + const gfx::Rect& requested_bounds) override;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(WmSnapToPixelLayoutManager);
|
| +};
|
| +
|
| +} // namespace wm
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_WM_COMMON_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
|
|
|