Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ui/aura_shell/default_container_layout_manager.h

Issue 8381015: Add workspace to desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily exlucde tests failing on win Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_ 5 #ifndef UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_
6 #define UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_ 6 #define UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/aura/layout_manager.h" 11 #include "ui/aura/layout_manager.h"
12 #include "ui/aura_shell/aura_shell_export.h" 12 #include "ui/aura_shell/aura_shell_export.h"
13 13
14 namespace aura { 14 namespace aura {
15 class MouseEvent;
15 class Window; 16 class Window;
16 } 17 }
17 18
18 namespace gfx { 19 namespace gfx {
19 class Rect; 20 class Rect;
20 } 21 }
21 22
22 namespace aura_shell { 23 namespace aura_shell {
24 class WorkspaceManager;
25
23 namespace internal { 26 namespace internal {
24 27
25 // LayoutManager for the default window container. 28 // LayoutManager for the default window container.
26 class AURA_SHELL_EXPORT DefaultContainerLayoutManager 29 class AURA_SHELL_EXPORT DefaultContainerLayoutManager
27 : public aura::LayoutManager { 30 : public aura::LayoutManager {
28 public: 31 public:
29 explicit DefaultContainerLayoutManager(aura::Window* owner); 32 DefaultContainerLayoutManager(
33 aura::Window* owner, WorkspaceManager* workspace_manager);
30 virtual ~DefaultContainerLayoutManager(); 34 virtual ~DefaultContainerLayoutManager();
31 35
36 // Invoked when a window receives drag event.
37 void PrepareForMoveOrResize(aura::Window* drag, aura::MouseEvent* event);
38
39 // Invoked when a drag event didn't start any drag operation.
40 void CancelMoveOrResize(aura::Window* drag, aura::MouseEvent* event);
41
42 // Invoked when a user finished moving window.
43 void EndMove(aura::Window* drag, aura::MouseEvent* evnet);
44
45 // Invoked when a user finished resizing window.
46 void EndResize(aura::Window* drag, aura::MouseEvent* evnet);
47
32 // Overridden from aura::LayoutManager: 48 // Overridden from aura::LayoutManager:
33 virtual void OnWindowResized() OVERRIDE; 49 virtual void OnWindowResized() OVERRIDE;
34 virtual void OnWindowAdded(aura::Window* child) OVERRIDE; 50 virtual void OnWindowAdded(aura::Window* child) OVERRIDE;
35 virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE; 51 virtual void OnWillRemoveWindow(aura::Window* child) OVERRIDE;
36 virtual void OnChildWindowVisibilityChanged(aura::Window* child, 52 virtual void OnChildWindowVisibilityChanged(aura::Window* child,
37 bool visibile) OVERRIDE; 53 bool visibile) OVERRIDE;
38 virtual void CalculateBoundsForChild(aura::Window* child, 54 virtual void CalculateBoundsForChild(aura::Window* child,
39 gfx::Rect* requested_bounds) OVERRIDE; 55 gfx::Rect* requested_bounds) OVERRIDE;
40
41 private: 56 private:
42 aura::Window* owner_; 57 aura::Window* owner_;
43 58
59 WorkspaceManager* workspace_manager_;
60
61 // A window that are currently moved or resized. Used to put
62 // different constraints on drag window.
63 aura::Window* drag_window_;
64
65 // A flag to control layout behavior. This is set to true while
66 // workspace manager is laying out children and LayoutManager
67 // ignores bounds check.
68 bool ignore_calculate_bounds_;
69
44 DISALLOW_COPY_AND_ASSIGN(DefaultContainerLayoutManager); 70 DISALLOW_COPY_AND_ASSIGN(DefaultContainerLayoutManager);
45 }; 71 };
46 72
47 } // namespace internal 73 } // namespace internal
48 } // namespace aura_shell 74 } // namespace aura_shell
49 75
50 #endif // UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_ 76 #endif // UI_AURA_SHELL_DEFAULT_CONTAINER_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/default_container_event_filter.cc ('k') | ui/aura_shell/default_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698