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

Side by Side Diff: mojo/services/surfaces/surfaces_impl.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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 | « mojo/services/surfaces/display_impl.cc ('k') | mojo/services/surfaces/surfaces_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
(Empty)
1 // Copyright 2014 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_SURFACES_IMPL_H_
6 #define SERVICES_SURFACES_SURFACES_IMPL_H_
7
8 #include "cc/surfaces/display_client.h"
9 #include "cc/surfaces/surface_factory.h"
10 #include "cc/surfaces/surface_factory_client.h"
11 #include "mojo/common/weak_binding_set.h"
12 #include "mojo/public/cpp/application/application_connection.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h"
14 #include "third_party/mojo_services/src/gpu/public/interfaces/command_buffer.moj om.h"
15 #include "third_party/mojo_services/src/gpu/public/interfaces/viewport_parameter _listener.mojom.h"
16 #include "third_party/mojo_services/src/surfaces/public/interfaces/surfaces.mojo m.h"
17
18 namespace cc {
19 class Display;
20 }
21
22 namespace mojo {
23 class ApplicationManager;
24 }
25
26 namespace surfaces {
27 class SurfacesScheduler;
28
29 class SurfacesImpl : public mojo::Surface, public cc::SurfaceFactoryClient {
30 public:
31 SurfacesImpl(cc::SurfaceManager* manager,
32 uint32_t id_namespace,
33 SurfacesScheduler* scheduler,
34 mojo::InterfaceRequest<mojo::Surface> request);
35
36 ~SurfacesImpl() override;
37
38 // Surface implementation.
39 void GetIdNamespace(const Surface::GetIdNamespaceCallback& callback) override;
40 void SetResourceReturner(mojo::ResourceReturnerPtr returner) override;
41 void CreateSurface(uint32_t local_id) override;
42 void SubmitFrame(uint32_t local_id,
43 mojo::FramePtr frame,
44 const mojo::Closure& callback) override;
45 void DestroySurface(uint32_t local_id) override;
46
47 // SurfaceFactoryClient implementation.
48 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
49
50 cc::SurfaceFactory* factory() { return &factory_; }
51
52 private:
53 cc::SurfaceId QualifyIdentifier(uint32_t local_id);
54
55 cc::SurfaceManager* manager_;
56 cc::SurfaceFactory factory_;
57 const uint32_t id_namespace_;
58 SurfacesScheduler* scheduler_;
59 mojo::ScopedMessagePipeHandle command_buffer_handle_;
60 mojo::ResourceReturnerPtr returner_;
61 mojo::StrongBinding<Surface> binding_;
62
63 DISALLOW_COPY_AND_ASSIGN(SurfacesImpl);
64 };
65
66 } // namespace surfaces
67
68 #endif // SERVICES_SURFACES_SURFACES_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/surfaces/display_impl.cc ('k') | mojo/services/surfaces/surfaces_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698