OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ | 5 #ifndef COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ |
6 #define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ | 6 #define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public mojo::InterfaceFactory<ResourceProvider> { | 21 public mojo::InterfaceFactory<ResourceProvider> { |
22 public: | 22 public: |
23 explicit ResourceProviderApp(const std::string& resource_provider_app_url); | 23 explicit ResourceProviderApp(const std::string& resource_provider_app_url); |
24 ~ResourceProviderApp() override; | 24 ~ResourceProviderApp() override; |
25 | 25 |
26 private: | 26 private: |
27 // mojo::ShellClient: | 27 // mojo::ShellClient: |
28 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, | 28 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, |
29 uint32_t id) override; | 29 uint32_t id) override; |
30 bool AcceptConnection(mojo::Connection* connection) override; | 30 bool AcceptConnection(mojo::Connection* connection) override; |
| 31 void ShellConnectionLost() override; |
31 | 32 |
32 // mojo::InterfaceFactory<ResourceProvider>: | 33 // mojo::InterfaceFactory<ResourceProvider>: |
33 void Create(mojo::Connection* connection, | 34 void Create(mojo::Connection* connection, |
34 mojo::InterfaceRequest<ResourceProvider> request) override; | 35 mojo::InterfaceRequest<ResourceProvider> request) override; |
35 | 36 |
36 mojo::TracingImpl tracing_; | 37 mojo::TracingImpl tracing_; |
37 | 38 |
38 mojo::BindingSet<ResourceProvider> bindings_; | 39 mojo::BindingSet<ResourceProvider> bindings_; |
39 | 40 |
40 // The name of the app that the resource provider code lives in. When using | 41 // The name of the app that the resource provider code lives in. When using |
41 // core services, it'll be the url of that. Otherwise it'll just be | 42 // core services, it'll be the url of that. Otherwise it'll just be |
42 // mojo:resource_provider. | 43 // mojo:resource_provider. |
43 std::string resource_provider_app_url_; | 44 std::string resource_provider_app_url_; |
44 | 45 |
45 DISALLOW_COPY_AND_ASSIGN(ResourceProviderApp); | 46 DISALLOW_COPY_AND_ASSIGN(ResourceProviderApp); |
46 }; | 47 }; |
47 | 48 |
48 } // namespace resource_provider | 49 } // namespace resource_provider |
49 | 50 |
50 #endif // COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ | 51 #endif // COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ |
OLD | NEW |