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

Unified Diff: mash/package/mash_packaged_service.h

Issue 2295433003: Changes around how browser_tests are launched for mash (Closed)
Patch Set: make manifest chromeos specific Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/package/DEPS ('k') | mash/package/mash_packaged_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/package/mash_packaged_service.h
diff --git a/mash/package/mash_packaged_service.h b/mash/package/mash_packaged_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..98b5bb5b95d1caa1b7c6e6e2cfb9928a58200fe0
--- /dev/null
+++ b/mash/package/mash_packaged_service.h
@@ -0,0 +1,51 @@
+// Copyright 2016 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 MASH_PACKAGE_MASH_PACKAGED_SERVICE_H_
+#define MASH_PACKAGE_MASH_PACKAGED_SERVICE_H_
+
+#include <memory>
+
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/shell/public/cpp/interface_factory.h"
+#include "services/shell/public/cpp/service.h"
+#include "services/shell/public/interfaces/service_factory.mojom.h"
+
+namespace mash {
+
+// MashPackagedService is a Service implementation that starts all the mash
+// apps. It's used when mash is packaged inside chrome or tests. To use you'll
+// need a manifest similar to what is used by chrome and browser_tests.
+class MashPackagedService
+ : public shell::Service,
+ public shell::mojom::ServiceFactory,
+ public shell::InterfaceFactory<shell::mojom::ServiceFactory> {
+ public:
+ MashPackagedService();
+ ~MashPackagedService() override;
+
+ // shell::Service:
+ bool OnConnect(const shell::Identity& remote_identity,
+ shell::InterfaceRegistry* registry) override;
+
+ // shell::InterfaceFactory<ServiceFactory>
+ void Create(const shell::Identity& remote_identity,
+ mojo::InterfaceRequest<ServiceFactory> request) override;
+
+ // ServiceFactory:
+ void CreateService(shell::mojom::ServiceRequest request,
+ const std::string& mojo_name) override;
+
+ private:
+ std::unique_ptr<shell::Service> CreateService(const std::string& name);
+
+ mojo::BindingSet<ServiceFactory> service_factory_bindings_;
+ std::unique_ptr<shell::Service> service_;
+
+ DISALLOW_COPY_AND_ASSIGN(MashPackagedService);
+};
+
+} // namespace mash
+
+#endif // MASH_PACKAGE_MASH_PACKAGED_SERVICE_H_
« no previous file with comments | « mash/package/DEPS ('k') | mash/package/mash_packaged_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698