summaryrefslogtreecommitdiffstats
path: root/aura/desktop.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 19:32:06 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 19:32:06 +0000
commit81585f3fa532dbe0355991b56c8d5bbb7b9ae321 (patch)
tree69f78267fc35600fec11a9533fe5d7af18ed42dc /aura/desktop.h
parentf1aa3566cb4b397eb4f567e8b88610d81de17566 (diff)
downloadchromium_src-81585f3fa532dbe0355991b56c8d5bbb7b9ae321.zip
chromium_src-81585f3fa532dbe0355991b56c8d5bbb7b9ae321.tar.gz
chromium_src-81585f3fa532dbe0355991b56c8d5bbb7b9ae321.tar.bz2
Shell of implementation for embedded windows. At this point this is
just a proof of concept. Next step is going to be pulling code from the window manager into this. Desktop will likely be renamed to WindowManager. At this point just make sure you think I'm not going off into the weeds. BUG=none TEST=none R=derat@chromium.org Review URL: http://codereview.chromium.org/7534002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94733 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'aura/desktop.h')
-rw-r--r--aura/desktop.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/aura/desktop.h b/aura/desktop.h
new file mode 100644
index 0000000..4bed643
--- /dev/null
+++ b/aura/desktop.h
@@ -0,0 +1,58 @@
+// 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 AURA_DESKTOP_H_
+#define AURA_DESKTOP_H_
+#pragma once
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class Size;
+}
+
+namespace ui {
+class Compositor;
+class Window;
+}
+
+namespace aura {
+
+// Desktop is responsible for hosting a set of windows.
+class Desktop {
+ public:
+ Desktop(gfx::AcceleratedWidget widget, const gfx::Size& size);
+ ~Desktop();
+
+ // Draws the necessary set of windows.
+ void Draw();
+
+ // Compositor we're drawing to.
+ ui::Compositor* compositor() { return compositor_.get(); }
+
+ private:
+ friend class Window;
+
+ typedef std::vector<Window*> Windows;
+
+ // Methods invoked by Window.
+ // TODO: move these into an interface that Window uses to talk to Desktop.
+ void AddWindow(Window* window);
+ void RemoveWindow(Window* window);
+
+ scoped_refptr<ui::Compositor> compositor_;
+
+ // The windows. Topmost window is last.
+ std::vector<Window*> windows_;
+
+ DISALLOW_COPY_AND_ASSIGN(Desktop);
+};
+
+} // namespace aura
+
+#endif // AURA_DESKTOP_H_