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.
5 #ifndef MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
6 #define MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
8 #include "base/macros.h"
9 #include "cc/surfaces/surface_manager.h"
10 #include "mojo/public/cpp/application/application_delegate.h"
11 #include "mojo/public/cpp/application/interface_factory.h"
12 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h"
13 #include "mojo/services/surfaces/surfaces_impl.h"
16 class ApplicationConnection
;
18 class SurfacesServiceApplication
: public ApplicationDelegate
,
19 public InterfaceFactory
<SurfacesService
>,
20 public SurfacesImpl::Client
{
22 SurfacesServiceApplication();
23 virtual ~SurfacesServiceApplication();
25 // ApplicationDelegate implementation.
26 virtual bool ConfigureIncomingConnection(
27 ApplicationConnection
* connection
) OVERRIDE
;
29 // InterfaceFactory<SurfacsServicee> implementation.
30 virtual void Create(ApplicationConnection
* connection
,
31 InterfaceRequest
<SurfacesService
> request
) OVERRIDE
;
33 // SurfacesImpl::Client implementation.
34 virtual void FrameSubmitted() OVERRIDE
;
35 virtual void SetDisplay(cc::Display
*) OVERRIDE
;
38 cc::SurfaceManager manager_
;
39 uint32_t next_id_namespace_
;
40 cc::Display
* display_
;
42 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication
);
47 #endif // MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_