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

Unified Diff: ash/wm/root_window_layout_manager.cc

Issue 2032613002: Converts RootWindowLayoutManager to common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/root_window_layout_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/root_window_layout_manager.cc
diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc
index f29bff18681045cc680a0f00d247fcd6efcb00d0..9146d7341c260d4846ac017c65199fa72ffb74a5 100644
--- a/ash/wm/root_window_layout_manager.cc
+++ b/ash/wm/root_window_layout_manager.cc
@@ -4,75 +4,52 @@
#include "ash/wm/root_window_layout_manager.h"
-#include "ash/desktop_background/desktop_background_widget_controller.h"
-#include "ash/root_window_controller.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/aura/window_tracker.h"
-#include "ui/compositor/layer.h"
-#include "ui/views/widget/widget.h"
+#include "ash/common/wm/wm_window.h"
+#include "ash/common/wm/wm_window_tracker.h"
namespace ash {
+namespace wm {
////////////////////////////////////////////////////////////////////////////////
// RootWindowLayoutManager, public:
-RootWindowLayoutManager::RootWindowLayoutManager(aura::Window* owner)
- : owner_(owner) {
-}
-
-RootWindowLayoutManager::~RootWindowLayoutManager() {
-}
+RootWindowLayoutManager::RootWindowLayoutManager(WmWindow* owner)
+ : owner_(owner) {}
+RootWindowLayoutManager::~RootWindowLayoutManager() {}
////////////////////////////////////////////////////////////////////////////////
// RootWindowLayoutManager, aura::LayoutManager implementation:
void RootWindowLayoutManager::OnWindowResized() {
- gfx::Rect fullscreen_bounds =
- gfx::Rect(owner_->bounds().width(), owner_->bounds().height());
+ const gfx::Rect fullscreen_bounds = gfx::Rect(owner_->GetBounds().size());
// Resize both our immediate children (the containers-of-containers animated
// by PowerButtonController) and their children (the actual containers).
- aura::WindowTracker children_tracker(owner_->children());
+ WmWindowTracker children_tracker(owner_->GetChildren());
while (!children_tracker.windows().empty()) {
- aura::Window* child = children_tracker.Pop();
+ WmWindow* child = children_tracker.Pop();
child->SetBounds(fullscreen_bounds);
- aura::WindowTracker grandchildren_tracker(child->children());
+ WmWindowTracker grandchildren_tracker(child->GetChildren());
while (!grandchildren_tracker.windows().empty())
grandchildren_tracker.Pop()->SetBounds(fullscreen_bounds);
}
- RootWindowController* root_window_controller =
- GetRootWindowController(owner_);
- DesktopBackgroundWidgetController* background =
- root_window_controller->wallpaper_controller();
-
- if (!background && root_window_controller->animating_wallpaper_controller()) {
- background = root_window_controller->animating_wallpaper_controller()->
- GetController(false);
- }
- if (background)
- background->SetBounds(fullscreen_bounds);
}
-void RootWindowLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
-}
+void RootWindowLayoutManager::OnWindowAddedToLayout(WmWindow* child) {}
-void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(
- aura::Window* child) {
-}
+void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(WmWindow* child) {}
-void RootWindowLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
-}
+void RootWindowLayoutManager::OnWindowRemovedFromLayout(WmWindow* child) {}
-void RootWindowLayoutManager::OnChildWindowVisibilityChanged(
- aura::Window* child,
- bool visible) {
-}
+void RootWindowLayoutManager::OnChildWindowVisibilityChanged(WmWindow* child,
+ bool visible) {}
void RootWindowLayoutManager::SetChildBounds(
- aura::Window* child,
+ WmWindow* child,
const gfx::Rect& requested_bounds) {
- SetChildBoundsDirect(child, requested_bounds);
+ child->SetBoundsDirect(requested_bounds);
}
+} // namespace wm
} // namespace ash
« no previous file with comments | « ash/wm/root_window_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698