OLD | NEW |
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/public/cpp/application/application_delegate.h" | 10 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/interface_factory.h" | 11 #include "mojo/public/cpp/application/interface_factory.h" |
11 #include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h" | 12 #include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h" |
12 | 13 |
13 namespace mojo { | 14 namespace mojo { |
14 class ApplicationConnection; | 15 class ApplicationConnection; |
15 } | 16 } |
16 | 17 |
17 namespace fake_surfaces { | 18 namespace fake_surfaces { |
18 | 19 |
19 class FakeSurfacesServiceApplication | 20 class FakeSurfacesServiceApplication |
20 : public mojo::ApplicationDelegate, | 21 : public mojo::ApplicationDelegate, |
21 public mojo::InterfaceFactory<mojo::SurfacesService> { | 22 public mojo::InterfaceFactory<mojo::SurfacesService> { |
22 public: | 23 public: |
23 FakeSurfacesServiceApplication(); | 24 FakeSurfacesServiceApplication(); |
24 ~FakeSurfacesServiceApplication() override; | 25 ~FakeSurfacesServiceApplication() override; |
25 | 26 |
26 // ApplicationDelegate implementation. | 27 // ApplicationDelegate implementation. |
27 void Initialize(mojo::ApplicationImpl* app) override; | 28 void Initialize(mojo::ApplicationImpl* app) override; |
28 bool ConfigureIncomingConnection( | 29 bool ConfigureIncomingConnection( |
29 mojo::ApplicationConnection* connection) override; | 30 mojo::ApplicationConnection* connection) override; |
30 | 31 |
31 // InterfaceFactory<SurfacsService> implementation. | 32 // InterfaceFactory<SurfacsService> implementation. |
32 void Create(mojo::ApplicationConnection* connection, | 33 void Create(mojo::ApplicationConnection* connection, |
33 mojo::InterfaceRequest<mojo::SurfacesService> request) override; | 34 mojo::InterfaceRequest<mojo::SurfacesService> request) override; |
34 | 35 |
35 private: | 36 private: |
36 uint32_t next_id_namespace_; | 37 uint32_t next_id_namespace_; |
| 38 mojo::TracingImpl tracing_; |
37 | 39 |
38 DISALLOW_COPY_AND_ASSIGN(FakeSurfacesServiceApplication); | 40 DISALLOW_COPY_AND_ASSIGN(FakeSurfacesServiceApplication); |
39 }; | 41 }; |
40 | 42 |
41 } // namespace fake_surfaces | 43 } // namespace fake_surfaces |
42 | 44 |
43 #endif // FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 45 #endif // FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
OLD | NEW |