[Bluetooth, Performance] Cache the Bluetooth adapter name on Mac.
[chromium-blink-merge.git] / components / surfaces / surfaces_service_application.h
blobba55d0c124e97d2cb2827050fed58e5b275f3684
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 COMPONENTS_SURFACES_SURFACES_SERVICE_APPLICATION_H_
6 #define COMPONENTS_SURFACES_SURFACES_SERVICE_APPLICATION_H_
8 #include "base/macros.h"
9 #include "cc/surfaces/surface_manager.h"
10 #include "components/surfaces/public/interfaces/display.mojom.h"
11 #include "components/surfaces/public/interfaces/surfaces.mojom.h"
12 #include "mojo/common/tracing_impl.h"
13 #include "third_party/mojo/src/mojo/public/cpp/application/application_delegate.h"
14 #include "third_party/mojo/src/mojo/public/cpp/application/interface_factory.h"
16 namespace mojo {
17 class ApplicationConnection;
20 namespace surfaces {
21 class SurfacesScheduler;
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;
31 // ApplicationDelegate implementation.
32 void Initialize(mojo::ApplicationImpl* app) override;
33 bool ConfigureIncomingConnection(
34 mojo::ApplicationConnection* connection) override;
36 // InterfaceFactory<DisplayFactory> implementation.
37 void Create(mojo::ApplicationConnection* connection,
38 mojo::InterfaceRequest<mojo::DisplayFactory> request) override;
40 // InterfaceFactory<Surface> implementation.
41 void Create(mojo::ApplicationConnection* connection,
42 mojo::InterfaceRequest<mojo::Surface> request) override;
44 private:
45 cc::SurfaceManager manager_;
46 uint32_t next_id_namespace_;
47 scoped_ptr<SurfacesScheduler> scheduler_;
48 mojo::TracingImpl tracing_;
50 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication);
53 } // namespace surfaces
55 #endif // COMPONENTS_SURFACES_SURFACES_SERVICE_APPLICATION_H_