| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_MUS_SURFACE_BINDING_H_ | 5 #ifndef UI_VIEWS_MUS_SURFACE_BINDING_H_ |
| 6 #define UI_VIEWS_MUS_SURFACE_BINDING_H_ | 6 #define UI_VIEWS_MUS_SURFACE_BINDING_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "components/mus/public/interfaces/window_tree.mojom.h" | 12 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 12 #include "ui/views/mus/mus_export.h" | 13 #include "ui/views/mus/mus_export.h" |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 class OutputSurface; | 16 class OutputSurface; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace mojo { | 19 namespace mojo { |
| 19 class Connector; | 20 class Connector; |
| 20 } | 21 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 // connection. | 33 // connection. |
| 33 class VIEWS_MUS_EXPORT SurfaceBinding { | 34 class VIEWS_MUS_EXPORT SurfaceBinding { |
| 34 public: | 35 public: |
| 35 SurfaceBinding(mojo::Connector* connector, | 36 SurfaceBinding(mojo::Connector* connector, |
| 36 mus::Window* window, | 37 mus::Window* window, |
| 37 mus::mojom::SurfaceType surface_type); | 38 mus::mojom::SurfaceType surface_type); |
| 38 ~SurfaceBinding(); | 39 ~SurfaceBinding(); |
| 39 | 40 |
| 40 // Creates an OutputSurface that renders to the Window supplied to the | 41 // Creates an OutputSurface that renders to the Window supplied to the |
| 41 // constructor. | 42 // constructor. |
| 42 scoped_ptr<cc::OutputSurface> CreateOutputSurface(); | 43 std::unique_ptr<cc::OutputSurface> CreateOutputSurface(); |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 class PerConnectionState; | 46 class PerConnectionState; |
| 46 | 47 |
| 47 mus::Window* window_; | 48 mus::Window* window_; |
| 48 const mus::mojom::SurfaceType surface_type_; | 49 const mus::mojom::SurfaceType surface_type_; |
| 49 scoped_refptr<PerConnectionState> state_; | 50 scoped_refptr<PerConnectionState> state_; |
| 50 | 51 |
| 51 DISALLOW_COPY_AND_ASSIGN(SurfaceBinding); | 52 DISALLOW_COPY_AND_ASSIGN(SurfaceBinding); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 } // namespace views | 55 } // namespace views |
| 55 | 56 |
| 56 #endif // UI_VIEWS_MUS_SURFACE_BINDING_H_ | 57 #endif // UI_VIEWS_MUS_SURFACE_BINDING_H_ |
| OLD | NEW |