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

Unified Diff: ash/mus/bridge/mus_layout_manager_adapter.cc

Issue 2578373002: Removes some dead code and includes (Closed)
Patch Set: Created 4 years 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/mus/bridge/mus_layout_manager_adapter.h ('k') | ash/mus/bridge/wm_window_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/mus_layout_manager_adapter.cc
diff --git a/ash/mus/bridge/mus_layout_manager_adapter.cc b/ash/mus/bridge/mus_layout_manager_adapter.cc
deleted file mode 100644
index 2cada41691fe1e97be1169104cc8bde7f6a06622..0000000000000000000000000000000000000000
--- a/ash/mus/bridge/mus_layout_manager_adapter.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2016 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/mus/bridge/mus_layout_manager_adapter.h"
-
-#include "ash/common/wm_layout_manager.h"
-#include "ash/mus/bridge/wm_window_mus.h"
-#include "services/ui/public/cpp/window.h"
-
-namespace ash {
-namespace mus {
-
-MusLayoutManagerAdapter::MusLayoutManagerAdapter(
- ui::Window* window,
- std::unique_ptr<WmLayoutManager> layout_manager)
- : window_(window),
- layout_manager_(std::move(layout_manager)) {
- window_->AddObserver(this);
-}
-
-MusLayoutManagerAdapter::~MusLayoutManagerAdapter() {
- window_->RemoveObserver(this);
-}
-
-void MusLayoutManagerAdapter::OnTreeChanging(const TreeChangeParams& params) {
- if (params.old_parent == window_) {
- layout_manager_->OnWillRemoveWindowFromLayout(
- WmWindowMus::Get(params.target));
- }
-}
-
-void MusLayoutManagerAdapter::OnTreeChanged(const TreeChangeParams& params) {
- if (params.new_parent == window_)
- layout_manager_->OnWindowAddedToLayout(WmWindowMus::Get(params.target));
- else if (params.old_parent == window_)
- layout_manager_->OnWindowRemovedFromLayout(WmWindowMus::Get(params.target));
-}
-
-void MusLayoutManagerAdapter::OnWindowBoundsChanged(
- ui::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- layout_manager_->OnWindowResized();
-}
-
-void MusLayoutManagerAdapter::OnChildWindowVisibilityChanged(ui::Window* window,
- bool visible) {
- layout_manager_->OnChildWindowVisibilityChanged(WmWindowMus::Get(window),
- visible);
-}
-
-} // namespace mus
-} // namespace ash
« no previous file with comments | « ash/mus/bridge/mus_layout_manager_adapter.h ('k') | ash/mus/bridge/wm_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698