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

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

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 #ifndef SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_
6 #define SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_
7
8 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "mojo/services/surfaces/public/interfaces/display.mojom.h"
10 #include "services/surfaces/display_impl.h"
11
12 namespace cc {
13 class SurfaceManager;
14 }
15
16 namespace surfaces {
17
18 class DisplayFactoryImpl : public mojo::DisplayFactory {
19 public:
20 DisplayFactoryImpl(cc::SurfaceManager* manager,
21 uint32_t id_namespace,
22 DisplayImpl::Client* client,
23 mojo::InterfaceRequest<mojo::DisplayFactory> request);
24 ~DisplayFactoryImpl() override;
25
26 private:
27 // mojo::DisplayFactory implementation.
28 void Create(mojo::ContextProviderPtr context_provider,
29 mojo::ViewportParameterListenerPtr viewport_parameter_listener,
30 mojo::ResourceReturnerPtr returner,
31 mojo::InterfaceRequest<mojo::Display> display_request) override;
32
33 // We use one ID namespace for all DisplayImpls since the ID is used only by
34 // cc and not exposed through mojom.
35 uint32_t id_namespace_;
36 uint32_t next_local_id_;
37 DisplayImpl::Client* client_;
38 cc::SurfaceManager* manager_;
39 mojo::StrongBinding<mojo::DisplayFactory> binding_;
40 };
41
42 } // namespace surfaces
43
44 #endif // SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698