Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1179)

Side by Side Diff: ash/wm/root_window_layout_manager.cc

Issue 2025413002: Moves RootWindowControllerCommon and LayoutManager to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_root_window_controller_common
Patch Set: add back static_assert Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #include "ash/wm/root_window_layout_manager.h"
6
7 #include "ash/common/wm/wm_window.h"
8 #include "ash/common/wm/wm_window_tracker.h"
9
10 namespace ash {
11 namespace wm {
12
13 ////////////////////////////////////////////////////////////////////////////////
14 // RootWindowLayoutManager, public:
15
16 RootWindowLayoutManager::RootWindowLayoutManager(WmWindow* owner)
17 : owner_(owner) {}
18
19 RootWindowLayoutManager::~RootWindowLayoutManager() {}
20
21 ////////////////////////////////////////////////////////////////////////////////
22 // RootWindowLayoutManager, aura::LayoutManager implementation:
23
24 void RootWindowLayoutManager::OnWindowResized() {
25 const gfx::Rect fullscreen_bounds = gfx::Rect(owner_->GetBounds().size());
26
27 // Resize both our immediate children (the containers-of-containers animated
28 // by PowerButtonController) and their children (the actual containers).
29 WmWindowTracker children_tracker(owner_->GetChildren());
30 while (!children_tracker.windows().empty()) {
31 WmWindow* child = children_tracker.Pop();
32 child->SetBounds(fullscreen_bounds);
33 WmWindowTracker grandchildren_tracker(child->GetChildren());
34 while (!grandchildren_tracker.windows().empty())
35 grandchildren_tracker.Pop()->SetBounds(fullscreen_bounds);
36 }
37 }
38
39 void RootWindowLayoutManager::OnWindowAddedToLayout(WmWindow* child) {}
40
41 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(WmWindow* child) {}
42
43 void RootWindowLayoutManager::OnWindowRemovedFromLayout(WmWindow* child) {}
44
45 void RootWindowLayoutManager::OnChildWindowVisibilityChanged(WmWindow* child,
46 bool visible) {}
47
48 void RootWindowLayoutManager::SetChildBounds(
49 WmWindow* child,
50 const gfx::Rect& requested_bounds) {
51 child->SetBoundsDirect(requested_bounds);
52 }
53
54 } // namespace wm
55 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698