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 MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 5 #ifndef MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
6 #define MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 6 #define MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
10 #include "mojo/public/cpp/application/application_delegate.h" | 10 #include "mojo/public/cpp/application/application_delegate.h" |
11 #include "mojo/services/surfaces/surfaces_impl.h" | 11 #include "mojo/services/surfaces/surfaces_impl.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 class ApplicationConnection; | 14 class ApplicationConnection; |
15 | 15 |
16 namespace surfaces { | 16 namespace surfaces { |
| 17 class Surfaces; |
17 | 18 |
18 class SurfacesServiceApplication : public ApplicationDelegate, | 19 class SurfacesServiceApplication : public ApplicationDelegate, |
19 public SurfacesImpl::Context { | 20 public InterfaceProvider<Surface>, |
| 21 public SurfacesImpl::Client { |
20 public: | 22 public: |
21 SurfacesServiceApplication(); | 23 SurfacesServiceApplication(); |
22 virtual ~SurfacesServiceApplication(); | 24 virtual ~SurfacesServiceApplication(); |
23 | 25 |
24 // ApplicationDelegate implementation. | 26 // ApplicationDelegate implementation. |
25 virtual bool ConfigureIncomingConnection( | 27 virtual bool ConfigureIncomingConnection( |
26 ApplicationConnection* connection) OVERRIDE; | 28 ApplicationConnection* connection) OVERRIDE; |
27 | 29 |
28 // SurfacesImpl::Context implementation. | 30 // InterfaceProvider<Surface> implementation. |
29 virtual cc::SurfaceManager* Manager() OVERRIDE; | 31 virtual void BindToRequest(ApplicationConnection* connection, |
30 virtual uint32_t IdNamespace() OVERRIDE; | 32 InterfaceRequest<Surface> request) OVERRIDE; |
| 33 |
| 34 // SurfacesImpl::Client implementation. |
31 virtual void FrameSubmitted() OVERRIDE; | 35 virtual void FrameSubmitted() OVERRIDE; |
32 virtual void SetDisplay(cc::Display*) OVERRIDE; | 36 virtual void SetDisplay(cc::Display*) OVERRIDE; |
33 | 37 |
34 private: | 38 private: |
35 cc::SurfaceManager manager_; | 39 cc::SurfaceManager manager_; |
36 uint32_t next_id_namespace_; | 40 uint32_t next_id_namespace_; |
37 cc::Display* display_; | 41 cc::Display* display_; |
38 | 42 |
39 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication); | 43 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication); |
40 }; | 44 }; |
41 | 45 |
42 } // namespace surfaces | 46 } // namespace surfaces |
43 } // namespace mojo | 47 } // namespace mojo |
44 | 48 |
45 #endif // MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 49 #endif // MOJO_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
OLD | NEW |