Move more string_util functions to base namespace.
[chromium-blink-merge.git] / ash / snap_to_pixel_layout_manager.h
bloba5233d422dc03c82c3298f81bfa301bd9a0a45bf
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
3 // found in the LICENSE file.
5 #ifndef ASH_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
6 #define ASH_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_
8 #include "ash/ash_export.h"
9 #include "base/macros.h"
10 #include "ui/aura/layout_manager.h"
12 namespace ash {
14 // A layout manager that places children's layer at the physical pixel
15 // boundaries.
16 class ASH_EXPORT SnapToPixelLayoutManager : public aura::LayoutManager {
17 public:
18 explicit SnapToPixelLayoutManager(aura::Window* container);
19 ~SnapToPixelLayoutManager() override;
21 protected:
22 // Overridden from aura::LayoutManager:
23 void OnWindowResized() override;
24 void OnWindowAddedToLayout(aura::Window* child) override;
25 void OnWillRemoveWindowFromLayout(aura::Window* child) override;
26 void OnWindowRemovedFromLayout(aura::Window* child) override;
27 void OnChildWindowVisibilityChanged(aura::Window* child,
28 bool visibile) override;
29 void SetChildBounds(aura::Window* child,
30 const gfx::Rect& requested_bounds) override;
32 private:
33 DISALLOW_COPY_AND_ASSIGN(SnapToPixelLayoutManager);
36 } // namespace ash
38 #endif // ASH_WM_SNAP_TO_PIXEL_LAYOUT_MANAGER_H_