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

Unified Diff: mandoline/ui/aura/surface_binding.h

Issue 1123643007: Restore aura support from Mojo repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 | « mandoline/ui/aura/screen_mojo.cc ('k') | mandoline/ui/aura/surface_binding.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/aura/surface_binding.h
diff --git a/mandoline/ui/aura/surface_binding.h b/mandoline/ui/aura/surface_binding.h
new file mode 100644
index 0000000000000000000000000000000000000000..3a1eeaa03e4ac210a9e9281d3fe67435d95b7a7d
--- /dev/null
+++ b/mandoline/ui/aura/surface_binding.h
@@ -0,0 +1,48 @@
+// Copyright 2015 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 MANDOLINE_UI_AURA_SURFACE_BINDING_H_
+#define MANDOLINE_UI_AURA_SURFACE_BINDING_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace cc {
+class OutputSurface;
+}
+
+namespace mojo {
+class Shell;
+class View;
+}
+
+namespace mandoline {
+
+// SurfaceBinding is responsible for managing the connections necessary to
+// bind a View to the surfaces service.
+// Internally SurfaceBinding manages one connection (and related structures) per
+// ViewManager. That is, all Views from a particular ViewManager share the same
+// connection.
+class SurfaceBinding {
+ public:
+ SurfaceBinding(mojo::Shell* shell, mojo::View* view);
+ ~SurfaceBinding();
+
+ // Creates an OutputSurface that renders to the View supplied to the
+ // constructor.
+ scoped_ptr<cc::OutputSurface> CreateOutputSurface();
+
+ private:
+ class PerViewManagerState;
+
+ mojo::Shell* shell_;
+ mojo::View* view_;
+ scoped_refptr<PerViewManagerState> state_;
+
+ DISALLOW_COPY_AND_ASSIGN(SurfaceBinding);
+};
+
+} // namespace mandoline
+
+#endif // MANDOLINE_UI_AURA_SURFACE_BINDING_H_
« no previous file with comments | « mandoline/ui/aura/screen_mojo.cc ('k') | mandoline/ui/aura/surface_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698