Chromium Code Reviews| Index: ash/wm/common/wm_layout_manager.h |
| diff --git a/ash/wm/common/wm_layout_manager.h b/ash/wm/common/wm_layout_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3a898a7fa59b7cc0b2c8edbd0e746ace9614d972 |
| --- /dev/null |
| +++ b/ash/wm/common/wm_layout_manager.h |
| @@ -0,0 +1,53 @@ |
| +// 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_WM_COMMON_WM_LAYOUT_MANAGER_H_ |
| +#define ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ |
| + |
| +#include "ash/ash_export.h" |
| + |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +namespace ash { |
| +namespace wm { |
| + |
| +class WmWindow; |
| + |
| +class ASH_EXPORT WmLayoutManager { |
|
James Cook
2016/04/15 17:44:35
nit: Class comment. What does this do and why must
sky
2016/04/15 19:26:36
Ya, sorry. This is mostly transitional and I figur
|
| + public: |
| + virtual ~WmLayoutManager() {} |
| + |
| + // Invoked when the window is resized. |
| + virtual void OnWindowResized() = 0; |
| + |
| + // Invoked when the window |child| has been added. |
| + virtual void OnWindowAddedToLayout(WmWindow* child) = 0; |
| + |
| + // Invoked prior to removing |window|. |
| + virtual void OnWillRemoveWindowFromLayout(WmWindow* child) = 0; |
| + |
| + // Invoked after removing |window|. |
| + virtual void OnWindowRemovedFromLayout(WmWindow* child) = 0; |
| + |
| + // Invoked when the |SetVisible()| is invoked on the window |child|. |
|
James Cook
2016/04/15 17:44:35
nit: "when the |SetVisible()|" -> "when |SetVisibl
sky
2016/04/15 19:26:36
Sorry, I copied this from aura. I've cleaned it al
|
| + // |visible| is the value supplied to |SetVisible()|. If |visible| is true, |
| + // window->IsVisible() may still return false. See description in |
|
James Cook
2016/04/15 17:44:35
nit: Did you mean child->IsVisible()?
|
| + // Window::IsVisible() for details. |
|
James Cook
2016/04/15 17:44:35
nit: Which "Window" do you mean here? aura::Window
|
| + virtual void OnChildWindowVisibilityChanged(WmWindow* child, |
| + bool visibile) = 0; |
| + |
| + // Invoked when |WmWindow::SetBounds| is called on |child|. |
| + // Implementation must call |SetChildBoundsDirect| to change the |
| + // |child|'s bounds. LayoutManager may modify |requested_bounds| |
| + // before applying, or ignore the request. |
| + virtual void SetChildBounds(WmWindow* child, |
| + const gfx::Rect& requested_bounds) = 0; |
| +}; |
| + |
| +} // namespace wm |
| +} // namespace ash |
| + |
| +#endif // ASH_WM_COMMON_WM_LAYOUT_MANAGER_H_ |