| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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. | |
| 4 | |
| 5 #ifndef MOJO_AURA_SURFACE_BINDING_H_ | |
| 6 #define MOJO_AURA_SURFACE_BINDING_H_ | |
| 7 | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 | |
| 11 namespace cc { | |
| 12 class OutputSurface; | |
| 13 } | |
| 14 | |
| 15 namespace mojo { | |
| 16 class Shell; | |
| 17 class View; | |
| 18 | |
| 19 // SurfaceBinding is responsible for managing the connections necessary to | |
| 20 // bind a View to the surfaces service. | |
| 21 // Internally SurfaceBinding manages one connection (and related structures) per | |
| 22 // ViewManager. That is, all Views from a particular ViewManager share the same | |
| 23 // connection. | |
| 24 class SurfaceBinding { | |
| 25 public: | |
| 26 SurfaceBinding(Shell* shell, View* view); | |
| 27 ~SurfaceBinding(); | |
| 28 | |
| 29 // Creates an OutputSurface that renders to the View supplied to the | |
| 30 // constructor. | |
| 31 scoped_ptr<cc::OutputSurface> CreateOutputSurface(); | |
| 32 | |
| 33 private: | |
| 34 class PerViewManagerState; | |
| 35 | |
| 36 Shell* shell_; | |
| 37 View* view_; | |
| 38 scoped_refptr<PerViewManagerState> state_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(SurfaceBinding); | |
| 41 }; | |
| 42 | |
| 43 } // namespace mojo | |
| 44 | |
| 45 #endif // MOJO_AURA_SURFACE_BINDING_H_ | |
| OLD | NEW |