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

Unified Diff: mojo/aura/window_tree_host_mojo.h

Issue 314113011: Moves common view_manager related aura files to mojo/aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 6 years, 6 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 | « mojo/aura/context_factory_mojo.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/aura/window_tree_host_mojo.h
diff --git a/mojo/examples/aura_demo/window_tree_host_view_manager.h b/mojo/aura/window_tree_host_mojo.h
similarity index 69%
rename from mojo/examples/aura_demo/window_tree_host_view_manager.h
rename to mojo/aura/window_tree_host_mojo.h
index f22cdb61c89e7dc85678df7397492b972b997b61..fe5ca77544d85e4aa1d26712fe41049979ef32b4 100644
--- a/mojo/examples/aura_demo/window_tree_host_view_manager.h
+++ b/mojo/aura/window_tree_host_mojo.h
@@ -9,17 +9,31 @@
#include "ui/events/event_source.h"
#include "ui/gfx/geometry/rect.h"
+class SkBitmap;
+
+namespace ui {
+class Compositor;
+}
+
namespace mojo {
-namespace examples {
-class WindowTreeHostViewManager : public aura::WindowTreeHost,
- public ui::EventSource {
+class WindowTreeHostMojoDelegate;
+
+class WindowTreeHostMojo : public aura::WindowTreeHost, public ui::EventSource {
public:
- explicit WindowTreeHostViewManager(const gfx::Rect& bounds);
- virtual ~WindowTreeHostViewManager();
+ WindowTreeHostMojo(const gfx::Rect& bounds,
+ WindowTreeHostMojoDelegate* delegate);
+ virtual ~WindowTreeHostMojo();
+
+ // Returns the WindowTreeHostMojo for the specified compositor.
+ static WindowTreeHostMojo* ForCompositor(ui::Compositor* compositor);
const gfx::Rect& bounds() const { return bounds_; }
+ // Sets the contents to show in this WindowTreeHost. This forwards to the
+ // delegate.
+ void SetContents(const SkBitmap& contents);
+
private:
// WindowTreeHost:
virtual ui::EventSource* GetEventSource() OVERRIDE;
@@ -42,10 +56,11 @@ class WindowTreeHostViewManager : public aura::WindowTreeHost,
gfx::Rect bounds_;
- DISALLOW_COPY_AND_ASSIGN(WindowTreeHostViewManager);
+ WindowTreeHostMojoDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMojo);
};
-} // namespace examples
} // namespace mojo
#endif // MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_
« no previous file with comments | « mojo/aura/context_factory_mojo.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698