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

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

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
Index: ash/mus/bridge/mus_layout_manager_adapter.h
diff --git a/ash/mus/bridge/mus_layout_manager_adapter.h b/ash/mus/bridge/mus_layout_manager_adapter.h
deleted file mode 100644
index 7b7dc76b81cc554136d3b92f7869f50135236bf3..0000000000000000000000000000000000000000
--- a/ash/mus/bridge/mus_layout_manager_adapter.h
+++ /dev/null
@@ -1,55 +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.
-
-#ifndef ASH_MUS_BRIDGE_MUS_LAYOUT_MANAGER_ADAPTER_H_
-#define ASH_MUS_BRIDGE_MUS_LAYOUT_MANAGER_ADAPTER_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "services/ui/public/cpp/window_observer.h"
-
-namespace ash {
-class WmLayoutManager;
-
-namespace mus {
-
-// Used to associate a ui::Window with an WmLayoutManager. This
-// attaches an observer to the ui::Window and calls the appropriate methods on
-// the WmLayoutManager at the appropriate time.
-//
-// NOTE: WmLayoutManager provides the function SetChildBounds(). This is
-// expected to be called to change the bounds of the Window. For aura this
-// function is called by way of aura exposing a hook (aura::LayoutManager). Mus
-// has no such hook. To ensure SetChildBounds() is called correctly all bounds
-// changes to ui::Windows must be routed through WmWindowMus. WmWindowMus
-// ensures WmLayoutManager::SetChildBounds() is called appropriately.
-class MusLayoutManagerAdapter : public ui::WindowObserver {
- public:
- MusLayoutManagerAdapter(ui::Window* window,
- std::unique_ptr<WmLayoutManager> layout_manager);
- ~MusLayoutManagerAdapter() override;
-
- WmLayoutManager* layout_manager() { return layout_manager_.get(); }
-
- private:
- // ui::WindowObserver:
- void OnTreeChanging(const TreeChangeParams& params) override;
- void OnTreeChanged(const TreeChangeParams& params) override;
- void OnWindowBoundsChanged(ui::Window* window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
- void OnChildWindowVisibilityChanged(ui::Window* window,
- bool visible) override;
-
- ui::Window* window_;
- std::unique_ptr<WmLayoutManager> layout_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(MusLayoutManagerAdapter);
-};
-
-} // namespace mus
-} // namespace ash
-
-#endif // ASH_MUS_BRIDGE_MUS_LAYOUT_MANAGER_ADAPTER_H_
« no previous file with comments | « ash/mus/accelerators/accelerator_controller_registrar.cc ('k') | ash/mus/bridge/mus_layout_manager_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698