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

Unified Diff: aura/desktop.h

Issue 7534002: Shell of implementation for embedded windows. At this point this is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 9 years, 5 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
« no previous file with comments | « aura/demo/demo_main.cc ('k') | aura/desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: aura/desktop.h
diff --git a/aura/desktop.h b/aura/desktop.h
new file mode 100644
index 0000000000000000000000000000000000000000..4bed64361cdc09785815fd52ef047d20e467c5f3
--- /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_
« no previous file with comments | « aura/demo/demo_main.cc ('k') | aura/desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698