OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_AURA_LAYOUT_MANAGER_H_ | 5 #ifndef UI_AURA_LAYOUT_MANAGER_H_ |
6 #define UI_AURA_LAYOUT_MANAGER_H_ | 6 #define UI_AURA_LAYOUT_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 | 30 |
31 // Invoked prior to removing |window|. | 31 // Invoked prior to removing |window|. |
32 virtual void OnWillRemoveWindow(Window* child) = 0; | 32 virtual void OnWillRemoveWindow(Window* child) = 0; |
33 | 33 |
34 // Invoked when the |SetVisible()| is invoked on the window |child|. | 34 // Invoked when the |SetVisible()| is invoked on the window |child|. |
35 // |visible| is the value supplied to |SetVisible()|. If |visible| is true, | 35 // |visible| is the value supplied to |SetVisible()|. If |visible| is true, |
36 // window->IsVisible() may still return false. See description in | 36 // window->IsVisible() may still return false. See description in |
37 // Window::IsVisible() for details. | 37 // Window::IsVisible() for details. |
38 virtual void OnChildWindowVisibilityChanged(Window* child, bool visibile) = 0; | 38 virtual void OnChildWindowVisibilityChanged(Window* child, bool visibile) = 0; |
39 | 39 |
40 // Calculates the bounds for the |child| based on |requsted_bounds|. | 40 // Invoked when |Window::SetBounds| is called on |child|. |
41 virtual void CalculateBoundsForChild(Window* child, | 41 // Implementation must call |SetChildBoundsDirect| to change the |
42 gfx::Rect* requested_bounds) = 0; | 42 // |child|'s bounds. LayoutManager may modify |requested_bounds| |
43 // before apply, or ignore the request when appropriate. | |
sky
2011/10/31 23:17:34
apply -> applying
remove 'when appropriate'
oshima
2011/11/01 00:40:33
Done.
| |
44 virtual void SetChildBounds(Window* child, | |
45 const gfx::Rect& requested_bounds) = 0; | |
43 protected: | 46 protected: |
44 // Sets the child's bounds forcibly. LayoutManager is responsible | 47 // Sets the child's bounds forcibly. LayoutManager is responsible |
45 // for checking the state and make sure the bounds are correctly | 48 // for checking the state and make sure the bounds are correctly |
46 // adjusted. | 49 // adjusted. |
47 void SetChildBounds(aura::Window* child, const gfx::Rect& bounds); | 50 void SetChildBoundsDirect(aura::Window* child, const gfx::Rect& bounds); |
48 }; | 51 }; |
49 | 52 |
50 } // namespace aura | 53 } // namespace aura |
51 | 54 |
52 #endif // UI_AURA_LAYOUT_MANAGER_H_ | 55 #endif // UI_AURA_LAYOUT_MANAGER_H_ |
OLD | NEW |