Index: athena/screen/screen_manager_impl.cc |
diff --git a/athena/screen/screen_manager_impl.cc b/athena/screen/screen_manager_impl.cc |
index e426a80f873e3249c08820fd923c9f5ccb9965eb..448431574a5fc171060689983b87c4f56af9649c 100644 |
--- a/athena/screen/screen_manager_impl.cc |
+++ b/athena/screen/screen_manager_impl.cc |
@@ -4,6 +4,7 @@ |
#include "athena/screen/public/screen_manager.h" |
+#include "athena/common/fill_layout_manager.h" |
#include "athena/input/public/accelerator_manager.h" |
#include "athena/screen/background_controller.h" |
#include "athena/screen/screen_accelerator_handler.h" |
@@ -19,43 +20,6 @@ namespace { |
ScreenManager* instance = NULL; |
-// TODO(oshima): There seems to be a couple of private implementation which does |
-// the same. |
-// Consider consolidating and reuse it. |
-class FillLayoutManager : public aura::LayoutManager { |
- public: |
- explicit FillLayoutManager(aura::Window* container) : container_(container) { |
- DCHECK(container_); |
- } |
- |
- // aura::LayoutManager: |
- virtual void OnWindowResized() OVERRIDE { |
- gfx::Rect full_bounds = gfx::Rect(container_->bounds().size()); |
- for (aura::Window::Windows::const_iterator iter = |
- container_->children().begin(); |
- iter != container_->children().end(); |
- ++iter) { |
- SetChildBoundsDirect(*iter, full_bounds); |
- } |
- } |
- virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE { |
- SetChildBoundsDirect(child, (gfx::Rect(container_->bounds().size()))); |
- } |
- virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE {} |
- virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE {} |
- virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
- bool visible) OVERRIDE {} |
- virtual void SetChildBounds(aura::Window* child, |
- const gfx::Rect& requested_bounds) OVERRIDE { |
- // Ignore SetBounds request. |
- } |
- |
- private: |
- aura::Window* container_; |
- |
- DISALLOW_COPY_AND_ASSIGN(FillLayoutManager); |
-}; |
- |
class AthenaWindowTreeClient : public aura::client::WindowTreeClient { |
public: |
explicit AthenaWindowTreeClient(aura::Window* container) |