| 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_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "ui/aura/layout_manager.h" | 12 #include "ui/aura/layout_manager.h" |
| 13 #include "ash/ash_export.h" | |
| 14 | 13 |
| 15 namespace aura { | 14 namespace aura { |
| 16 class MouseEvent; | 15 class MouseEvent; |
| 17 class Window; | 16 class Window; |
| 18 } | 17 } |
| 19 | 18 |
| 20 namespace gfx { | 19 namespace gfx { |
| 21 class Rect; | 20 class Rect; |
| 22 } | 21 } |
| 23 | 22 |
| 24 namespace ash { | 23 namespace ash { |
| 25 namespace internal { | 24 namespace internal { |
| 26 | 25 |
| 27 class ShowStateController; | |
| 28 class WorkspaceManager; | 26 class WorkspaceManager; |
| 29 | 27 |
| 30 // LayoutManager for the default window container. | 28 // LayoutManager for top level windows when WorkspaceManager is enabled. |
| 31 class ASH_EXPORT WorkspaceLayoutManager : public aura::LayoutManager { | 29 class ASH_EXPORT WorkspaceLayoutManager : public aura::LayoutManager { |
| 32 public: | 30 public: |
| 33 explicit WorkspaceLayoutManager(WorkspaceManager* workspace_manager); | 31 explicit WorkspaceLayoutManager(WorkspaceManager* workspace_manager); |
| 34 virtual ~WorkspaceLayoutManager(); | 32 virtual ~WorkspaceLayoutManager(); |
| 35 | 33 |
| 36 // Returns the workspace manager for this container. | 34 // Returns the workspace manager for this container. |
| 37 WorkspaceManager* workspace_manager() { | 35 WorkspaceManager* workspace_manager() { |
| 38 return workspace_manager_; | 36 return workspace_manager_; |
| 39 } | 37 } |
| 40 | 38 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 54 void EndResize(aura::Window* drag, aura::MouseEvent* evnet); | 52 void EndResize(aura::Window* drag, aura::MouseEvent* evnet); |
| 55 | 53 |
| 56 // Overridden from aura::LayoutManager: | 54 // Overridden from aura::LayoutManager: |
| 57 virtual void OnWindowResized() OVERRIDE; | 55 virtual void OnWindowResized() OVERRIDE; |
| 58 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 56 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
| 59 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; | 57 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; |
| 60 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | 58 virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
| 61 bool visibile) OVERRIDE; | 59 bool visibile) OVERRIDE; |
| 62 virtual void SetChildBounds(aura::Window* child, | 60 virtual void SetChildBounds(aura::Window* child, |
| 63 const gfx::Rect& requested_bounds) OVERRIDE; | 61 const gfx::Rect& requested_bounds) OVERRIDE; |
| 62 |
| 64 private: | 63 private: |
| 65 // Owned by WorkspaceController. | 64 // Owned by WorkspaceController. |
| 66 WorkspaceManager* workspace_manager_; | 65 WorkspaceManager* workspace_manager_; |
| 67 | 66 |
| 68 scoped_ptr<ShowStateController> show_state_controller_; | |
| 69 | |
| 70 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 67 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
| 71 }; | 68 }; |
| 72 | 69 |
| 73 } // namespace internal | 70 } // namespace internal |
| 74 } // namespace ash | 71 } // namespace ash |
| 75 | 72 |
| 76 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 73 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| OLD | NEW |