1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MANDOLINE_UI_AURA_SURFACE_BINDING_H_
6 #define MANDOLINE_UI_AURA_SURFACE_BINDING_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
25 // SurfaceBinding is responsible for managing the connections necessary to
26 // bind a View to the surfaces service.
27 // Internally SurfaceBinding manages one connection (and related structures) per
28 // ViewTreeConnection. That is, all Views from a particular ViewTreeConnection
29 // share the same connection.
30 class SurfaceBinding
{
32 SurfaceBinding(mojo::Shell
* shell
, mus::View
* view
);
35 // Creates an OutputSurface that renders to the View supplied to the
37 scoped_ptr
<cc::OutputSurface
> CreateOutputSurface();
40 class PerConnectionState
;
44 scoped_refptr
<PerConnectionState
> state_
;
46 DISALLOW_COPY_AND_ASSIGN(SurfaceBinding
);
49 } // namespace mandoline
51 #endif // MANDOLINE_UI_AURA_SURFACE_BINDING_H_