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

Side by Side Diff: services/fake_surfaces/fake_surfaces_service_application.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, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 5 #ifndef FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
6 #define FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 6 #define FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/common/tracing_impl.h" 9 #include "mojo/common/tracing_impl.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
11 #include "mojo/public/cpp/application/interface_factory.h" 11 #include "mojo/public/cpp/application/interface_factory.h"
12 #include "mojo/services/surfaces/public/interfaces/display.mojom.h"
12 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" 13 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 class ApplicationConnection; 16 class ApplicationConnection;
16 } 17 }
17 18
18 namespace fake_surfaces { 19 namespace fake_surfaces {
19 20
20 class FakeSurfacesServiceApplication 21 class FakeSurfacesServiceApplication
21 : public mojo::ApplicationDelegate, 22 : public mojo::ApplicationDelegate,
23 public mojo::InterfaceFactory<mojo::DisplayFactory>,
22 public mojo::InterfaceFactory<mojo::Surface> { 24 public mojo::InterfaceFactory<mojo::Surface> {
23 public: 25 public:
24 FakeSurfacesServiceApplication(); 26 FakeSurfacesServiceApplication();
25 ~FakeSurfacesServiceApplication() override; 27 ~FakeSurfacesServiceApplication() override;
26 28
27 // ApplicationDelegate implementation. 29 // ApplicationDelegate implementation.
28 void Initialize(mojo::ApplicationImpl* app) override; 30 void Initialize(mojo::ApplicationImpl* app) override;
29 bool ConfigureIncomingConnection( 31 bool ConfigureIncomingConnection(
30 mojo::ApplicationConnection* connection) override; 32 mojo::ApplicationConnection* connection) override;
31 33
34 // InterfaceFactory<mojo::DisplayFactory> implementation.
35 void Create(mojo::ApplicationConnection* connection,
36 mojo::InterfaceRequest<mojo::DisplayFactory> request) override;
37
32 // InterfaceFactory<mojo::Surface> implementation. 38 // InterfaceFactory<mojo::Surface> implementation.
33 void Create(mojo::ApplicationConnection* connection, 39 void Create(mojo::ApplicationConnection* connection,
34 mojo::InterfaceRequest<mojo::Surface> request) override; 40 mojo::InterfaceRequest<mojo::Surface> request) override;
35 41
36 private: 42 private:
37 uint32_t next_id_namespace_; 43 uint32_t next_id_namespace_;
38 mojo::TracingImpl tracing_; 44 mojo::TracingImpl tracing_;
39 45
40 DISALLOW_COPY_AND_ASSIGN(FakeSurfacesServiceApplication); 46 DISALLOW_COPY_AND_ASSIGN(FakeSurfacesServiceApplication);
41 }; 47 };
42 48
43 } // namespace fake_surfaces 49 } // namespace fake_surfaces
44 50
45 #endif // FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 51 #endif // FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
OLDNEW
« no previous file with comments | « mojo/services/surfaces/public/interfaces/surfaces.mojom ('k') | services/fake_surfaces/fake_surfaces_service_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698