Chromium Code Reviews| 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 SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 5 #ifndef SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
| 6 #define SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 6 #define SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/timer/timer.h" | |
| 10 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 11 #include "mojo/common/tracing_impl.h" | 10 #include "mojo/common/tracing_impl.h" |
| 12 #include "mojo/public/cpp/application/application_delegate.h" | 11 #include "mojo/public/cpp/application/application_delegate.h" |
| 13 #include "mojo/public/cpp/application/interface_factory.h" | 12 #include "mojo/public/cpp/application/interface_factory.h" |
| 14 #include "services/surfaces/surfaces_impl.h" | 13 #include "mojo/services/surfaces/public/interfaces/display.mojom.h" |
| 15 #include "services/surfaces/surfaces_scheduler.h" | 14 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" |
| 16 | 15 |
| 17 namespace mojo { | 16 namespace mojo { |
| 18 class ApplicationConnection; | 17 class ApplicationConnection; |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace surfaces { | 20 namespace surfaces { |
| 21 class SurfacesScheduler; | |
|
qsr
2015/03/04 10:33:18
I guess I won't convince you to do a proper includ
jamesr
2015/03/04 23:00:27
What exactly is "proper" about having an include?
| |
| 22 | 22 |
| 23 class SurfacesServiceApplication | 23 class SurfacesServiceApplication |
| 24 : public mojo::ApplicationDelegate, | 24 : public mojo::ApplicationDelegate, |
| 25 public mojo::InterfaceFactory<mojo::Surface>, | 25 public mojo::InterfaceFactory<mojo::DisplayFactory>, |
| 26 public SurfacesImpl::Client, | 26 public mojo::InterfaceFactory<mojo::Surface> { |
| 27 public SurfacesScheduler::Client { | |
| 28 public: | 27 public: |
| 29 SurfacesServiceApplication(); | 28 SurfacesServiceApplication(); |
| 30 ~SurfacesServiceApplication() override; | 29 ~SurfacesServiceApplication() override; |
| 31 | 30 |
| 32 // ApplicationDelegate implementation. | 31 // ApplicationDelegate implementation. |
| 33 void Initialize(mojo::ApplicationImpl* app) override; | 32 void Initialize(mojo::ApplicationImpl* app) override; |
| 34 bool ConfigureIncomingConnection( | 33 bool ConfigureIncomingConnection( |
| 35 mojo::ApplicationConnection* connection) override; | 34 mojo::ApplicationConnection* connection) override; |
| 36 | 35 |
| 36 // InterfaceFactory<DisplayFactory> implementation. | |
| 37 void Create(mojo::ApplicationConnection* connection, | |
| 38 mojo::InterfaceRequest<mojo::DisplayFactory> request) override; | |
| 39 | |
| 37 // InterfaceFactory<Surface> implementation. | 40 // InterfaceFactory<Surface> implementation. |
| 38 void Create(mojo::ApplicationConnection* connection, | 41 void Create(mojo::ApplicationConnection* connection, |
| 39 mojo::InterfaceRequest<mojo::Surface> request) override; | 42 mojo::InterfaceRequest<mojo::Surface> request) override; |
| 40 | 43 |
| 41 // SurfacesImpl::Client implementation. | |
| 42 void OnVSyncParametersUpdated(base::TimeTicks timebase, | |
| 43 base::TimeDelta interval) override; | |
| 44 void FrameSubmitted() override; | |
| 45 void SetDisplay(cc::Display*) override; | |
| 46 void OnDisplayBeingDestroyed(cc::Display* display) override; | |
| 47 | |
| 48 // SurfacesScheduler::Client | |
| 49 void Draw() override; | |
| 50 | |
| 51 private: | 44 private: |
| 52 cc::SurfaceManager manager_; | 45 cc::SurfaceManager manager_; |
| 53 uint32_t next_id_namespace_; | 46 uint32_t next_id_namespace_; |
| 54 cc::Display* display_; | |
| 55 scoped_ptr<SurfacesScheduler> scheduler_; | 47 scoped_ptr<SurfacesScheduler> scheduler_; |
| 56 mojo::TracingImpl tracing_; | 48 mojo::TracingImpl tracing_; |
| 57 | 49 |
| 58 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication); | 50 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication); |
| 59 }; | 51 }; |
| 60 | 52 |
| 61 } // namespace surfaces | 53 } // namespace surfaces |
| 62 | 54 |
| 63 #endif // SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ | 55 #endif // SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ |
| OLD | NEW |