OLD | NEW |
| (Empty) |
1 // Copyright 2015 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. | |
4 | |
5 #ifndef COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ | |
6 #define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ | |
7 | |
8 #include <map> | |
9 | |
10 #include "components/resource_provider/public/interfaces/resource_provider.mojom
.h" | |
11 #include "mojo/common/weak_binding_set.h" | |
12 #include "third_party/mojo/src/mojo/public/cpp/application/application_delegate.
h" | |
13 #include "third_party/mojo/src/mojo/public/cpp/application/interface_factory.h" | |
14 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | |
15 #include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h" | |
16 | |
17 namespace mojo { | |
18 class ApplicationImpl; | |
19 } | |
20 | |
21 namespace resource_provider { | |
22 | |
23 class ResourceProviderApp : public mojo::ApplicationDelegate, | |
24 public mojo::InterfaceFactory<ResourceProvider> { | |
25 public: | |
26 ResourceProviderApp(); | |
27 ~ResourceProviderApp() override; | |
28 | |
29 private: | |
30 // ApplicationDelegate: | |
31 void Initialize(mojo::ApplicationImpl* app) override; | |
32 bool ConfigureIncomingConnection( | |
33 mojo::ApplicationConnection* connection) override; | |
34 | |
35 // mojo::InterfaceFactory<ResourceProvider>: | |
36 void Create(mojo::ApplicationConnection* connection, | |
37 mojo::InterfaceRequest<ResourceProvider> request) override; | |
38 | |
39 mojo::WeakBindingSet<ResourceProvider> bindings_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(ResourceProviderApp); | |
42 }; | |
43 | |
44 } // namespace resource_provider | |
45 | |
46 #endif // COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ | |
OLD | NEW |