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

Unified Diff: mojo/examples/surfaces_app/embedder.h

Issue 361123002: Mojo surfaces service and example app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: mojo/examples/surfaces_app/embedder.h
diff --git a/mojo/examples/surfaces_app/embedder.h b/mojo/examples/surfaces_app/embedder.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e04dfd30ec2a36ad31020c558ca1cdfc066143a
--- /dev/null
+++ b/mojo/examples/surfaces_app/embedder.h
@@ -0,0 +1,46 @@
+// Copyright 2014 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 MOJO_EXAMPLES_SURFACES_APP_EMBEDDER_H_
+#define MOJO_EXAMPLES_SURFACES_APP_EMBEDDER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/surfaces/surface_id.h"
+#include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h"
+#include "ui/gfx/size.h"
+
+namespace cc {
+class CompositorFrame;
+}
+
+namespace mojo {
+
+class ApplicationConnection;
+
+namespace examples {
+
+// Simple example of a surface embedder that embeds two other surfaces.
+class Embedder {
+ public:
+ explicit Embedder(surfaces::Surface* surface);
+ ~Embedder();
+
+ void SetSurfaceId(cc::SurfaceId id) { id_ = id; }
+ void ProduceFrame(cc::SurfaceId child_one,
+ cc::SurfaceId child_two,
+ const gfx::Size& child_size,
+ const gfx::Size& size,
+ double rotation_degrees);
+
+ private:
+ cc::SurfaceId id_;
+ surfaces::Surface* surface_;
+
+ DISALLOW_COPY_AND_ASSIGN(Embedder);
+};
+
+} // namespace examples
+} // namespace mojo
+
+#endif // MOJO_EXAMPLES_SURFACES_APP_EMBEDDER_H_

Powered by Google App Engine
This is Rietveld 408576698