OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_WM_BASE_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_BASE_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_BASE_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_BASE_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 public ash::ShellObserver, | 34 public ash::ShellObserver, |
35 public aura::WindowObserver { | 35 public aura::WindowObserver { |
36 public: | 36 public: |
37 typedef std::set<aura::Window*> WindowSet; | 37 typedef std::set<aura::Window*> WindowSet; |
38 | 38 |
39 explicit BaseLayoutManager(aura::RootWindow* root_window); | 39 explicit BaseLayoutManager(aura::RootWindow* root_window); |
40 virtual ~BaseLayoutManager(); | 40 virtual ~BaseLayoutManager(); |
41 | 41 |
42 const WindowSet& windows() const { return windows_; } | 42 const WindowSet& windows() const { return windows_; } |
43 | 43 |
| 44 // Given a |window| and tentative |restore_bounds|, returns new bounds that |
| 45 // ensure that at least a few pixels of the screen background are visible |
| 46 // outside the edges of the window. |
| 47 static gfx::Rect BoundsWithScreenEdgeVisible(aura::Window* window, |
| 48 const gfx::Rect& restore_bounds); |
| 49 |
44 // LayoutManager overrides: | 50 // LayoutManager overrides: |
45 virtual void OnWindowResized() OVERRIDE; | 51 virtual void OnWindowResized() OVERRIDE; |
46 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 52 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
47 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; | 53 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; |
48 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE; | 54 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE; |
49 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | 55 virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
50 bool visible) OVERRIDE; | 56 bool visible) OVERRIDE; |
51 virtual void SetChildBounds(aura::Window* child, | 57 virtual void SetChildBounds(aura::Window* child, |
52 const gfx::Rect& requested_bounds) OVERRIDE; | 58 const gfx::Rect& requested_bounds) OVERRIDE; |
53 | 59 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 93 |
88 aura::RootWindow* root_window_; | 94 aura::RootWindow* root_window_; |
89 | 95 |
90 DISALLOW_COPY_AND_ASSIGN(BaseLayoutManager); | 96 DISALLOW_COPY_AND_ASSIGN(BaseLayoutManager); |
91 }; | 97 }; |
92 | 98 |
93 } // namespace internal | 99 } // namespace internal |
94 } // namespace ash | 100 } // namespace ash |
95 | 101 |
96 #endif // ASH_WM_BASE_LAYOUT_MANAGER_H_ | 102 #endif // ASH_WM_BASE_LAYOUT_MANAGER_H_ |
OLD | NEW |