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

Unified Diff: ash/wm/status_area_layout_manager.cc

Issue 2268823002: mash: Move more shelf files to ash/common/shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase. Created 4 years, 4 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/status_area_layout_manager.h ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/status_area_layout_manager.cc
diff --git a/ash/wm/status_area_layout_manager.cc b/ash/wm/status_area_layout_manager.cc
deleted file mode 100644
index 7c3a0fd2161e69a2edc373411b0455dfa2770653..0000000000000000000000000000000000000000
--- a/ash/wm/status_area_layout_manager.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 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/wm/status_area_layout_manager.h"
-
-#include "ash/common/system/status_area_widget.h"
-#include "ash/common/wm_lookup.h"
-#include "ash/common/wm_window.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "base/auto_reset.h"
-
-namespace ash {
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaLayoutManager, public:
-
-StatusAreaLayoutManager::StatusAreaLayoutManager(ShelfWidget* shelf_widget)
- : in_layout_(false), shelf_widget_(shelf_widget) {}
-
-StatusAreaLayoutManager::~StatusAreaLayoutManager() {}
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaLayoutManager, aura::LayoutManager implementation:
-
-void StatusAreaLayoutManager::OnWindowResized() {
- LayoutStatusArea();
-}
-
-void StatusAreaLayoutManager::SetChildBounds(
- WmWindow* child,
- const gfx::Rect& requested_bounds) {
- // Only need to have the shelf do a layout if the child changing is the status
- // area and the shelf isn't in the process of doing a layout.
- if (child !=
- WmLookup::Get()->GetWindowForWidget(
- shelf_widget_->status_area_widget()) ||
- in_layout_) {
- wm::WmSnapToPixelLayoutManager::SetChildBounds(child, requested_bounds);
- return;
- }
-
- // If the bounds match, no need to do anything. Check for target bounds to
- // ensure any active animation is retargeted.
- if (requested_bounds == child->GetTargetBounds())
- return;
-
- wm::WmSnapToPixelLayoutManager::SetChildBounds(child, requested_bounds);
- LayoutStatusArea();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// StatusAreaLayoutManager, private:
-
-void StatusAreaLayoutManager::LayoutStatusArea() {
- // Shelf layout manager may be already doing layout.
- if (shelf_widget_->shelf_layout_manager()->updating_bounds())
- return;
-
- base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
- shelf_widget_->shelf_layout_manager()->LayoutShelf();
-}
-
-} // namespace ash
« no previous file with comments | « ash/wm/status_area_layout_manager.h ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698