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

Side by Side Diff: services/fake_surfaces/fake_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
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 FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 5 #ifndef FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
6 #define FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 6 #define FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/public/cpp/application/application_delegate.h" 9 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/interface_factory.h" 10 #include "mojo/public/cpp/application/interface_factory.h"
11 #include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h" 11 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 class ApplicationConnection; 14 class ApplicationConnection;
15 } 15 }
16 16
17 namespace fake_surfaces { 17 namespace fake_surfaces {
18 18
19 class FakeSurfacesServiceApplication 19 class FakeSurfacesServiceApplication
20 : public mojo::ApplicationDelegate, 20 : public mojo::ApplicationDelegate,
21 public mojo::InterfaceFactory<mojo::SurfacesService>,
22 public mojo::InterfaceFactory<mojo::Surface> { 21 public mojo::InterfaceFactory<mojo::Surface> {
23 public: 22 public:
24 FakeSurfacesServiceApplication(); 23 FakeSurfacesServiceApplication();
25 ~FakeSurfacesServiceApplication() override; 24 ~FakeSurfacesServiceApplication() override;
26 25
27 // ApplicationDelegate implementation. 26 // ApplicationDelegate implementation.
28 void Initialize(mojo::ApplicationImpl* app) override; 27 void Initialize(mojo::ApplicationImpl* app) override;
29 bool ConfigureIncomingConnection( 28 bool ConfigureIncomingConnection(
30 mojo::ApplicationConnection* connection) override; 29 mojo::ApplicationConnection* connection) override;
31 30
32 // InterfaceFactory<SurfacsService> implementation.
33 void Create(mojo::ApplicationConnection* connection,
34 mojo::InterfaceRequest<mojo::SurfacesService> request) override;
35
36 // InterfaceFactory<mojo::Surface> implementation. 31 // InterfaceFactory<mojo::Surface> implementation.
37 void Create(mojo::ApplicationConnection* connection, 32 void Create(mojo::ApplicationConnection* connection,
38 mojo::InterfaceRequest<mojo::Surface> request) override; 33 mojo::InterfaceRequest<mojo::Surface> request) override;
39 34
40 private: 35 private:
41 uint32_t next_id_namespace_; 36 uint32_t next_id_namespace_;
42 37
43 DISALLOW_COPY_AND_ASSIGN(FakeSurfacesServiceApplication); 38 DISALLOW_COPY_AND_ASSIGN(FakeSurfacesServiceApplication);
44 }; 39 };
45 40
46 } // namespace fake_surfaces 41 } // namespace fake_surfaces
47 42
48 #endif // FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_ 43 #endif // FAKE_SERVICES_SURFACES_SURFACES_SERVICE_APPLICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698