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

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

Issue 940293003: Add a Display and ContextProvider concept to mojom, use to recreate (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "services/surfaces/display_factory_impl.h"
6
7 #include "cc/surfaces/surface_id.h"
8
9 namespace surfaces {
10
11 DisplayFactoryImpl::DisplayFactoryImpl(
12 cc::SurfaceManager* manager,
13 uint32_t id_namespace,
14 DisplayImpl::Client* client,
15 mojo::InterfaceRequest<mojo::DisplayFactory> request)
16 : id_namespace_(id_namespace),
17 next_local_id_(1u),
18 client_(client),
19 manager_(manager),
20 binding_(this, request.Pass()) {
21 }
22
23 DisplayFactoryImpl::~DisplayFactoryImpl() {
24 }
25
26 void DisplayFactoryImpl::Create(
27 mojo::ContextProviderPtr context_provider,
28 mojo::ViewportParameterListenerPtr viewport_parameter_listener,
29 mojo::ResourceReturnerPtr returner,
30 mojo::InterfaceRequest<mojo::Display> display_request) {
31 cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 |
32 next_local_id_++);
33 new DisplayImpl(manager_, cc_id, client_, context_provider.Pass(),
34 viewport_parameter_listener.Pass(), returner.Pass(),
35 display_request.Pass());
36 }
37
38 } // namespace surfaces
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698