| OLD | NEW |
| (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_SERVICE_APPLICATION_H_ | |
| 6 #define SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "cc/surfaces/surface_manager.h" | |
| 10 #include "mojo/common/tracing_impl.h" | |
| 11 #include "mojo/public/cpp/application/application_delegate.h" | |
| 12 #include "mojo/public/cpp/application/interface_factory.h" | |
| 13 #include "mojo/services/surfaces/interfaces/display.mojom.h" | |
| 14 #include "mojo/services/surfaces/interfaces/surfaces.mojom.h" | |
| 15 | |
| 16 namespace mojo { | |
| 17 class ApplicationConnection; | |
| 18 } | |
| 19 | |
| 20 namespace surfaces { | |
| 21 class SurfacesScheduler; | |
| 22 | |
| 23 class SurfacesServiceApplication | |
| 24 : public mojo::ApplicationDelegate, | |
| 25 public mojo::InterfaceFactory<mojo::DisplayFactory>, | |
| 26 public mojo::InterfaceFactory<mojo::Surface> { | |
| 27 public: | |
| 28 SurfacesServiceApplication(); | |
| 29 ~SurfacesServiceApplication() override; | |
| 30 | |
| 31 // ApplicationDelegate implementation. | |
| 32 void Initialize(mojo::ApplicationImpl* app) override; | |
| 33 bool ConfigureIncomingConnection( | |
| 34 mojo::ApplicationConnection* connection) override; | |
| 35 | |
| 36 // InterfaceFactory<DisplayFactory> implementation. | |
| 37 void Create(mojo::ApplicationConnection* connection, | |
| 38 mojo::InterfaceRequest<mojo::DisplayFactory> request) override; | |
| 39 | |
| 40 // InterfaceFactory<Surface> implementation. | |
| 41 void Create(mojo::ApplicationConnection* connection, | |
| 42 mojo::InterfaceRequest<mojo::Surface> request) override; | |
| 43 | |
| 44 private: | |
| 45 cc::SurfaceManager manager_; | |
| 46 uint32_t next_id_namespace_; | |
| 47 scoped_ptr<SurfacesScheduler> scheduler_; | |
| 48 mojo::TracingImpl tracing_; | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication); | |
| 51 }; | |
| 52 | |
| 53 } // namespace surfaces | |
| 54 | |
| 55 #endif // SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | |
| OLD | NEW |