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 "components/mus/public/cpp/view_surface.h" | 5 #include "components/mus/public/cpp/view_surface.h" |
6 | 6 |
7 #include "components/mus/public/cpp/view_surface_client.h" | 7 #include "components/mus/public/cpp/view_surface_client.h" |
8 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 8 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mus { |
11 | 11 |
12 ViewSurface::~ViewSurface() {} | 12 ViewSurface::~ViewSurface() {} |
13 | 13 |
14 void ViewSurface::BindToThread() { | 14 void ViewSurface::BindToThread() { |
15 DCHECK(!bound_to_thread_); | 15 DCHECK(!bound_to_thread_); |
16 bound_to_thread_ = true; | 16 bound_to_thread_ = true; |
17 surface_.Bind(surface_info_.Pass()); | 17 surface_.Bind(surface_info_.Pass()); |
18 client_binding_.Bind(client_request_.Pass()); | 18 client_binding_.Bind(client_request_.Pass()); |
19 } | 19 } |
20 | 20 |
(...skipping 13 matching lines...) Expand all Loading... |
34 client_binding_(this), | 34 client_binding_(this), |
35 bound_to_thread_(false) {} | 35 bound_to_thread_(false) {} |
36 | 36 |
37 void ViewSurface::ReturnResources( | 37 void ViewSurface::ReturnResources( |
38 mojo::Array<mojo::ReturnedResourcePtr> resources) { | 38 mojo::Array<mojo::ReturnedResourcePtr> resources) { |
39 if (!client_) | 39 if (!client_) |
40 return; | 40 return; |
41 client_->OnResourcesReturned(this, resources.Pass()); | 41 client_->OnResourcesReturned(this, resources.Pass()); |
42 } | 42 } |
43 | 43 |
44 } // namespace mojo | 44 } // namespace mus |
OLD | NEW |