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

Unified Diff: ui/aura_shell/workspace/workspace.h

Issue 8381015: Add workspace to desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura_shell/workspace/workspace.h
diff --git a/ui/aura_shell/workspace/workspace.h b/ui/aura_shell/workspace/workspace.h
index 6bd4bb879c109b06e7554e842416642e2149d1a3..ed21f836160f93623a0fd92b9ae327c4c8782eb7 100644
--- a/ui/aura_shell/workspace/workspace.h
+++ b/ui/aura_shell/workspace/workspace.h
@@ -20,15 +20,14 @@ namespace aura_shell {
class WorkspaceManager;
class WorkspaceTest;
-// A workspace is a partial area of the entire desktop that is visible to
-// a user at a given time. The size of workspace is generally same as
-// the size of the monitor, and the desktiop can have multiple workspaces.
-// One workspace can contains limited number of windows and
-// the workspace manager may create new workspace if there is
-// no room for new windowk.
+// A workspace is a partial area of the entire desktop (viewport) that
+// is visible to a user at a given time. The size of workspace is
sky 2011/10/25 20:58:05 'to a user' -> 'to the user' 'size of workspace' -
+// generally same as the size of the monitor, and the desktiop can
sky 2011/10/25 20:58:05 'generally same' -> 'generally the same' desktiop
oshima 2011/10/25 23:37:23 Done.
+// have multiple workspaces.
+// One workspace can contains limited number of windows and the
sky 2011/10/25 20:58:05 Don't indent here. 'A worskpace contains a limited
oshima 2011/10/25 23:37:23 Done.
+// workspace manager may create new workspace if there is no room for
sky 2011/10/25 20:58:05 'may create new' -> 'may create a new' 'no room' -
oshima 2011/10/25 23:37:23 Done.
+// new windowk.
//
-// TODO(oshima): Add a work area bounds for workspace. It will be used to
-// limit the resize, layout and as bounds for a maximized window.
class AURA_SHELL_EXPORT Workspace {
public:
explicit Workspace(WorkspaceManager* manager);
@@ -47,6 +46,10 @@ class AURA_SHELL_EXPORT Workspace {
// failed.
bool AddWindowAfter(aura::Window* window, aura::Window* after);
+ // Returns the work area bounds of this workspace in viewport
+ // coordinates.
+ gfx::Rect GetWorkAreaBounds() const;
+
// Removes the |window| from this workspace.
void RemoveWindow(aura::Window* window);
@@ -56,6 +59,9 @@ class AURA_SHELL_EXPORT Workspace {
// Activates this workspace.
void Activate();
+ // Layout windows. |new_window| may be NULL.
+ void Layout(aura::Window* new_window);
sky 2011/10/25 20:58:05 Document what new_window is.
oshima 2011/10/25 23:37:23 Done.
+
private:
FRIEND_TEST_ALL_PREFIXES(WorkspaceTest, WorkspaceBasic);
@@ -65,6 +71,12 @@ class AURA_SHELL_EXPORT Workspace {
// Returns true if the given |window| can be added to this workspace.
bool CanAdd(aura::Window* window) const;
+ // Moves |window| to the given point. It performs animation when
+ // |animate| is true.
+ void MoveWindowTo(aura::Window* window,
+ const gfx::Point& origin,
+ bool animate);
+
WorkspaceManager* workspace_manager_;
gfx::Rect bounds_;

Powered by Google App Engine
This is Rietveld 408576698