Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: components/surfaces/display_factory_impl.cc

Issue 1139673003: Make Mandoline shut down cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/surfaces/display_factory_impl.h ('k') | components/surfaces/display_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "components/surfaces/surfaces_service_application.h"
8 9
9 namespace surfaces { 10 namespace surfaces {
10 11
11 DisplayFactoryImpl::DisplayFactoryImpl( 12 DisplayFactoryImpl::DisplayFactoryImpl(
13 SurfacesServiceApplication* application,
12 cc::SurfaceManager* manager, 14 cc::SurfaceManager* manager,
13 uint32_t id_namespace, 15 uint32_t id_namespace,
14 SurfacesScheduler* scheduler, 16 SurfacesScheduler* scheduler,
15 mojo::InterfaceRequest<mojo::DisplayFactory> request) 17 mojo::InterfaceRequest<mojo::DisplayFactory> request)
16 : id_namespace_(id_namespace), 18 : id_namespace_(id_namespace),
17 next_local_id_(1u), 19 next_local_id_(1u),
20 application_(application),
18 scheduler_(scheduler), 21 scheduler_(scheduler),
19 manager_(manager), 22 manager_(manager),
20 binding_(this, request.Pass()) { 23 binding_(this, request.Pass()) {
21 } 24 }
22 25
23 DisplayFactoryImpl::~DisplayFactoryImpl() { 26 DisplayFactoryImpl::~DisplayFactoryImpl() {
27 application_->DisplayFactoryDestroyed(this);
24 } 28 }
25 29
26 void DisplayFactoryImpl::Create( 30 void DisplayFactoryImpl::Create(
27 mojo::ContextProviderPtr context_provider, 31 mojo::ContextProviderPtr context_provider,
28 mojo::ResourceReturnerPtr returner, 32 mojo::ResourceReturnerPtr returner,
29 mojo::InterfaceRequest<mojo::Display> display_request) { 33 mojo::InterfaceRequest<mojo::Display> display_request) {
30 cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 | 34 cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 |
31 next_local_id_++); 35 next_local_id_++);
32 new DisplayImpl(manager_, cc_id, scheduler_, context_provider.Pass(), 36 new DisplayImpl(manager_, cc_id, scheduler_, context_provider.Pass(),
33 returner.Pass(), display_request.Pass()); 37 returner.Pass(), display_request.Pass());
34 } 38 }
35 39
36 } // namespace surfaces 40 } // namespace surfaces
OLDNEW
« no previous file with comments | « components/surfaces/display_factory_impl.h ('k') | components/surfaces/display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698