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 #include "ui/views/mus/surface_binding.h" | 5 #include "ui/views/mus/surface_binding.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/threading/thread_local.h" | 16 #include "base/threading/thread_local.h" |
17 #include "cc/output/compositor_frame.h" | 17 #include "cc/output/compositor_frame.h" |
18 #include "cc/output/output_surface.h" | 18 #include "cc/output/output_surface.h" |
19 #include "cc/output/output_surface_client.h" | 19 #include "cc/output/output_surface_client.h" |
20 #include "cc/output/software_output_device.h" | 20 #include "cc/output/software_output_device.h" |
21 #include "cc/resources/shared_bitmap_manager.h" | 21 #include "cc/resources/shared_bitmap_manager.h" |
22 #include "components/mus/public/cpp/context_provider.h" | 22 #include "components/mus/public/cpp/context_provider.h" |
23 #include "components/mus/public/cpp/output_surface.h" | 23 #include "components/mus/public/cpp/output_surface.h" |
24 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h" | |
25 #include "components/mus/public/cpp/window.h" | 24 #include "components/mus/public/cpp/window.h" |
26 #include "components/mus/public/cpp/window_tree_client.h" | 25 #include "components/mus/public/cpp/window_tree_client.h" |
27 #include "mojo/public/cpp/bindings/binding.h" | 26 #include "mojo/public/cpp/bindings/binding.h" |
28 #include "ui/views/mus/window_tree_host_mus.h" | 27 #include "ui/views/mus/window_tree_host_mus.h" |
29 | 28 |
30 namespace views { | 29 namespace views { |
31 | 30 |
32 // PerClientState -------------------------------------------------------------- | 31 // PerClientState -------------------------------------------------------------- |
33 | 32 |
34 // State needed per WindowTreeClient. Provides the real implementation of | 33 // State needed per WindowTreeClient. Provides the real implementation of |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 surface_type_(surface_type), | 119 surface_type_(surface_type), |
121 state_(PerClientState::Get(connector, window->window_tree())) {} | 120 state_(PerClientState::Get(connector, window->window_tree())) {} |
122 | 121 |
123 SurfaceBinding::~SurfaceBinding() {} | 122 SurfaceBinding::~SurfaceBinding() {} |
124 | 123 |
125 std::unique_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { | 124 std::unique_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { |
126 return state_ ? state_->CreateOutputSurface(window_, surface_type_) : nullptr; | 125 return state_ ? state_->CreateOutputSurface(window_, surface_type_) : nullptr; |
127 } | 126 } |
128 | 127 |
129 } // namespace views | 128 } // namespace views |
OLD | NEW |