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/surfaces/display_factory_impl.h" | 5 #include "components/surfaces/display_factory_impl.h" |
6 | 6 |
7 #include "cc/surfaces/surface_id.h" | 7 #include "cc/surfaces/surface_id.h" |
8 | 8 |
9 namespace surfaces { | 9 namespace surfaces { |
10 | 10 |
11 DisplayFactoryImpl::DisplayFactoryImpl( | 11 DisplayFactoryImpl::DisplayFactoryImpl( |
| 12 SurfacesServiceApplication* application, |
12 cc::SurfaceManager* manager, | 13 cc::SurfaceManager* manager, |
13 uint32_t id_namespace, | 14 uint32_t id_namespace, |
14 SurfacesScheduler* scheduler, | 15 SurfacesScheduler* scheduler, |
15 mojo::InterfaceRequest<mojo::DisplayFactory> request) | 16 mojo::InterfaceRequest<mojo::DisplayFactory> request) |
16 : id_namespace_(id_namespace), | 17 : id_namespace_(id_namespace), |
17 next_local_id_(1u), | 18 next_local_id_(1u), |
| 19 application_(application), |
18 scheduler_(scheduler), | 20 scheduler_(scheduler), |
19 manager_(manager), | 21 manager_(manager), |
20 binding_(this, request.Pass()) { | 22 binding_(this, request.Pass()) { |
21 } | 23 } |
22 | 24 |
23 DisplayFactoryImpl::~DisplayFactoryImpl() { | 25 DisplayFactoryImpl::~DisplayFactoryImpl() { |
24 } | 26 } |
25 | 27 |
26 void DisplayFactoryImpl::Create( | 28 void DisplayFactoryImpl::Create( |
27 mojo::ContextProviderPtr context_provider, | 29 mojo::ContextProviderPtr context_provider, |
28 mojo::ResourceReturnerPtr returner, | 30 mojo::ResourceReturnerPtr returner, |
29 mojo::InterfaceRequest<mojo::Display> display_request) { | 31 mojo::InterfaceRequest<mojo::Display> display_request) { |
30 cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 | | 32 cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 | |
31 next_local_id_++); | 33 next_local_id_++); |
32 new DisplayImpl(manager_, cc_id, scheduler_, context_provider.Pass(), | 34 new DisplayImpl(application_, manager_, cc_id, scheduler_, |
33 returner.Pass(), display_request.Pass()); | 35 context_provider.Pass(), returner.Pass(), |
| 36 display_request.Pass()); |
34 } | 37 } |
35 | 38 |
36 } // namespace surfaces | 39 } // namespace surfaces |
OLD | NEW |