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

Unified Diff: services/shell/service_manager.h

Issue 2389133008: Mash: Replaces "exe:chrome" with "service:content_browser" (Closed)
Patch Set: Created 4 years, 2 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
Index: services/shell/service_manager.h
diff --git a/services/shell/service_manager.h b/services/shell/service_manager.h
index ac83ade5a10b1020581c945d895909c507fa4b53..7ca4e19c074072c1e67cd36f4c4acd6ac2bbd565 100644
--- a/services/shell/service_manager.h
+++ b/services/shell/service_manager.h
@@ -7,8 +7,10 @@
#include <map>
#include <memory>
+#include <string>
#include <vector>
+#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/binding_set.h"
@@ -33,7 +35,9 @@ class ServiceContext;
// connects to services.
Identity CreateServiceManagerIdentity();
-class ServiceManager : public Service {
+class ServiceManager : public Service,
+ public InterfaceFactory<mojom::ServiceManagerControl>,
+ public mojom::ServiceManagerControl {
public:
// API for testing.
class TestAPI {
@@ -80,6 +84,16 @@ class ServiceManager : public Service {
bool OnConnect(const Identity& remote_identity,
InterfaceRegistry* registry) override;
+ // InterfaceFactory<mojom::ServiceManagerControl>:
+ void Create(const Identity& remote_identity,
+ mojom::ServiceManagerControlRequest request) override;
+
+ // mojom::ServiceManagerControl:
+ void OverridePackagePath(
+ const std::string& service_name,
+ const base::FilePath& path,
+ const OverridePackagePathCallback& callback) override;
+
void InitCatalog(mojom::ServicePtr catalog);
// Returns the resolver to use for the specified identity.
@@ -176,6 +190,8 @@ class ServiceManager : public Service {
base::Callback<void(const Identity&)> instance_quit_callback_;
std::unique_ptr<NativeRunnerFactory> native_runner_factory_;
std::unique_ptr<ServiceContext> service_context_;
+ mojo::BindingSet<mojom::ServiceManagerControl> control_bindings_;
+ std::map<std::string, base::FilePath> package_path_overrides_;
base::WeakPtrFactory<ServiceManager> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ServiceManager);

Powered by Google App Engine
This is Rietveld 408576698