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 "ash/ash_export.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class ASH_EXPORT WorkspaceLayoutManager : public aura::LayoutManager { | 29 class ASH_EXPORT WorkspaceLayoutManager : public aura::LayoutManager { |
30 public: | 30 public: |
31 explicit WorkspaceLayoutManager(WorkspaceManager* workspace_manager); | 31 explicit WorkspaceLayoutManager(WorkspaceManager* workspace_manager); |
32 virtual ~WorkspaceLayoutManager(); | 32 virtual ~WorkspaceLayoutManager(); |
33 | 33 |
34 // Returns the workspace manager for this container. | 34 // Returns the workspace manager for this container. |
35 WorkspaceManager* workspace_manager() { | 35 WorkspaceManager* workspace_manager() { |
36 return workspace_manager_; | 36 return workspace_manager_; |
37 } | 37 } |
38 | 38 |
39 // Invoked when a window receives drag event. | |
40 void PrepareForMoveOrResize(aura::Window* drag, aura::MouseEvent* event); | |
41 | |
42 // Invoked when a drag event didn't start any drag operation. | |
43 void CancelMoveOrResize(aura::Window* drag, aura::MouseEvent* event); | |
44 | |
45 // Invoked when a drag event moved the |window|. | |
46 void ProcessMove(aura::Window* window, aura::MouseEvent* event); | |
47 | |
48 // Invoked when a user finished moving window. | |
49 void EndMove(aura::Window* drag, aura::MouseEvent* event); | |
50 | |
51 // Invoked when a user finished resizing window. | |
52 void EndResize(aura::Window* drag, aura::MouseEvent* event); | |
53 | |
54 // Overridden from aura::LayoutManager: | 39 // Overridden from aura::LayoutManager: |
55 virtual void OnWindowResized() OVERRIDE; | 40 virtual void OnWindowResized() OVERRIDE; |
56 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 41 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; |
57 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; | 42 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; |
58 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | 43 virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
59 bool visibile) OVERRIDE; | 44 bool visibile) OVERRIDE; |
60 virtual void SetChildBounds(aura::Window* child, | 45 virtual void SetChildBounds(aura::Window* child, |
61 const gfx::Rect& requested_bounds) OVERRIDE; | 46 const gfx::Rect& requested_bounds) OVERRIDE; |
62 | 47 |
63 private: | 48 private: |
64 // Owned by WorkspaceController. | 49 // Owned by WorkspaceController. |
65 WorkspaceManager* workspace_manager_; | 50 WorkspaceManager* workspace_manager_; |
66 | 51 |
67 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 52 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
68 }; | 53 }; |
69 | 54 |
70 } // namespace internal | 55 } // namespace internal |
71 } // namespace ash | 56 } // namespace ash |
72 | 57 |
73 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 58 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
OLD | NEW |