Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: services/surfaces/surfaces_service_application.h

Issue 882083003: Remove mojo.SurfacesService interface in favor of mojo.Surface directly (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/surfaces/BUILD.gn ('k') | services/surfaces/surfaces_service_application.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 9 #include "base/timer/timer.h"
10 #include "cc/surfaces/surface_manager.h" 10 #include "cc/surfaces/surface_manager.h"
11 #include "mojo/public/cpp/application/application_delegate.h" 11 #include "mojo/public/cpp/application/application_delegate.h"
12 #include "mojo/public/cpp/application/interface_factory.h" 12 #include "mojo/public/cpp/application/interface_factory.h"
13 #include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h"
14 #include "services/surfaces/surfaces_impl.h" 13 #include "services/surfaces/surfaces_impl.h"
15 #include "services/surfaces/surfaces_scheduler.h" 14 #include "services/surfaces/surfaces_scheduler.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 {
22 21
23 class SurfacesServiceApplication 22 class SurfacesServiceApplication
24 : public mojo::ApplicationDelegate, 23 : public mojo::ApplicationDelegate,
25 public mojo::InterfaceFactory<mojo::SurfacesService>,
26 public mojo::InterfaceFactory<mojo::Surface>, 24 public mojo::InterfaceFactory<mojo::Surface>,
27 public SurfacesImpl::Client, 25 public SurfacesImpl::Client,
28 public SurfacesScheduler::Client { 26 public SurfacesScheduler::Client {
29 public: 27 public:
30 SurfacesServiceApplication(); 28 SurfacesServiceApplication();
31 ~SurfacesServiceApplication() override; 29 ~SurfacesServiceApplication() override;
32 30
33 // ApplicationDelegate implementation. 31 // ApplicationDelegate implementation.
34 void Initialize(mojo::ApplicationImpl* app) override; 32 void Initialize(mojo::ApplicationImpl* app) override;
35 bool ConfigureIncomingConnection( 33 bool ConfigureIncomingConnection(
36 mojo::ApplicationConnection* connection) override; 34 mojo::ApplicationConnection* connection) override;
37 35
38 // InterfaceFactory<SurfacesServicee> implementation.
39 void Create(mojo::ApplicationConnection* connection,
40 mojo::InterfaceRequest<mojo::SurfacesService> request) override;
41
42 // InterfaceFactory<Surface> implementation. 36 // InterfaceFactory<Surface> implementation.
43 void Create(mojo::ApplicationConnection* connection, 37 void Create(mojo::ApplicationConnection* connection,
44 mojo::InterfaceRequest<mojo::Surface> request) override; 38 mojo::InterfaceRequest<mojo::Surface> request) override;
45 39
46 // SurfacesImpl::Client implementation. 40 // SurfacesImpl::Client implementation.
47 void OnVSyncParametersUpdated(base::TimeTicks timebase, 41 void OnVSyncParametersUpdated(base::TimeTicks timebase,
48 base::TimeDelta interval) override; 42 base::TimeDelta interval) override;
49 void FrameSubmitted() override; 43 void FrameSubmitted() override;
50 void SetDisplay(cc::Display*) override; 44 void SetDisplay(cc::Display*) override;
51 void OnDisplayBeingDestroyed(cc::Display* display) override; 45 void OnDisplayBeingDestroyed(cc::Display* display) override;
52 46
53 // SurfacesScheduler::Client 47 // SurfacesScheduler::Client
54 void Draw() override; 48 void Draw() override;
55 49
56 private: 50 private:
57 cc::SurfaceManager manager_; 51 cc::SurfaceManager manager_;
58 uint32_t next_id_namespace_; 52 uint32_t next_id_namespace_;
59 cc::Display* display_; 53 cc::Display* display_;
60 scoped_ptr<SurfacesScheduler> scheduler_; 54 scoped_ptr<SurfacesScheduler> scheduler_;
61 55
62 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication); 56 DISALLOW_COPY_AND_ASSIGN(SurfacesServiceApplication);
63 }; 57 };
64 58
65 } // namespace surfaces 59 } // namespace surfaces
66 60
67 #endif // SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 61 #endif // SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
OLDNEW
« no previous file with comments | « services/surfaces/BUILD.gn ('k') | services/surfaces/surfaces_service_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698