summaryrefslogtreecommitdiffstats
path: root/ash/snap_to_pixel_layout_manager.cc
blob: 00b12daa43be49c5fdb80c7ec7d37f959c06c6f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2014 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.

#include "ash/snap_to_pixel_layout_manager.h"

#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
#include "ui/aura/window.h"

namespace ash {

SnapToPixelLayoutManager::SnapToPixelLayoutManager(aura::Window* container) {
  DCHECK(container->GetProperty(kSnapChildrenToPixelBoundary));
}

SnapToPixelLayoutManager::~SnapToPixelLayoutManager() {
}

void SnapToPixelLayoutManager::OnWindowResized() {
}

void SnapToPixelLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
}

void SnapToPixelLayoutManager::OnWillRemoveWindowFromLayout(
    aura::Window* child) {
}

void SnapToPixelLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
}

void SnapToPixelLayoutManager::OnChildWindowVisibilityChanged(
    aura::Window* child,
    bool visibile) {
}

void SnapToPixelLayoutManager::SetChildBounds(
    aura::Window* child,
    const gfx::Rect& requested_bounds) {
  SetChildBoundsDirect(child, requested_bounds);
  wm::SnapWindowToPixelBoundary(child);
}

}  // namespace ash