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

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

Issue 8400067: Fixes bug where windows weren't being moved and resized if the desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks 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_controller.h
diff --git a/ui/aura_shell/workspace/workspace_controller.h b/ui/aura_shell/workspace/workspace_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..d928f96db10126756e7639d6318c1f2103b08138
--- /dev/null
+++ b/ui/aura_shell/workspace/workspace_controller.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_
+#define UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/aura/desktop_observer.h"
+#include "ui/aura_shell/aura_shell_export.h"
+
+namespace aura {
+class Window;
+}
+
+namespace gfx {
+class Size;
+}
+
+namespace aura_shell {
+namespace internal {
+
+class DefaultContainerLayoutManager;
+class WorkspaceManager;
+
+// WorkspaceControlls owns a WorkspaceManager. WorkspaceControlls bridges
+// events From DesktopObserver translating them to WorkspaceManager.
+class AURA_SHELL_EXPORT WorkspaceController : public aura::DesktopObserver {
+ public:
+ explicit WorkspaceController(aura::Window* window);
+ virtual ~WorkspaceController();
+
+ void ToggleOverview();
+
+ internal::DefaultContainerLayoutManager* layout_manager() {
+ return layout_manager_;
+ }
+
+ // DesktopObserver overrides:
+ virtual void OnDesktopResized(const gfx::Size& new_size) OVERRIDE;
+ virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE;
+
+ private:
+ scoped_ptr<WorkspaceManager> workspace_manager_;
+
+ // This is owned by the window it's installed on.
+ internal::DefaultContainerLayoutManager* layout_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(WorkspaceController);
+};
+
+} // namespace internal
+} // namespace aura_shell
+
+#endif // UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698