Index: components/resource_provider/resource_provider_app.h |
diff --git a/components/resource_provider/resource_provider_app.h b/components/resource_provider/resource_provider_app.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..55bb94099b0816db146594d2a56647ccc6d2b034 |
--- /dev/null |
+++ b/components/resource_provider/resource_provider_app.h |
@@ -0,0 +1,46 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ |
+#define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ |
+ |
+#include <map> |
+ |
+#include "components/resource_provider/public/interfaces/resource_provider.mojom.h" |
+#include "mojo/common/weak_binding_set.h" |
+#include "third_party/mojo/src/mojo/public/cpp/application/application_delegate.h" |
+#include "third_party/mojo/src/mojo/public/cpp/application/interface_factory.h" |
+#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" |
+#include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h" |
+ |
+namespace mojo { |
+class ApplicationImpl; |
+} |
+ |
+namespace resource_provider { |
+ |
+class ResourceProviderApp : public mojo::ApplicationDelegate, |
+ public mojo::InterfaceFactory<ResourceProvider> { |
+ public: |
+ ResourceProviderApp(); |
+ ~ResourceProviderApp() override; |
+ |
+ private: |
+ // ApplicationDelegate: |
+ void Initialize(mojo::ApplicationImpl* app) override; |
+ bool ConfigureIncomingConnection( |
+ mojo::ApplicationConnection* connection) override; |
+ |
+ // mojo::InterfaceFactory<ResourceProvider>: |
+ void Create(mojo::ApplicationConnection* connection, |
+ mojo::InterfaceRequest<ResourceProvider> request) override; |
+ |
+ mojo::WeakBindingSet<ResourceProvider> bindings_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ResourceProviderApp); |
+}; |
+ |
+} // namespace resource_provider |
+ |
+#endif // COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_APP_H_ |