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

Unified Diff: mash/task_viewer/task_viewer.h

Issue 2476063002: Service Manager: Rework Service and ServiceContext lifetime (Closed)
Patch Set: . Created 4 years, 1 month 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/session/session.cc ('k') | mash/task_viewer/task_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/task_viewer/task_viewer.h
diff --git a/mash/task_viewer/task_viewer.h b/mash/task_viewer/task_viewer.h
index b22b0e105e9edc8d32994079096e5e6ca20a62f1..1f94aaa04f3407325fad9fbdc6804149fa184c77 100644
--- a/mash/task_viewer/task_viewer.h
+++ b/mash/task_viewer/task_viewer.h
@@ -12,9 +12,14 @@
#include "base/macros.h"
#include "mash/public/interfaces/launchable.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/tracing/public/cpp/provider.h"
+namespace service_manager {
+class ServiceContext;
+}
+
namespace views {
class AuraInit;
class Widget;
@@ -35,7 +40,7 @@ class TaskViewer : public service_manager::Service,
private:
// service_manager::Service:
- void OnStart(const service_manager::ServiceInfo& info) override;
+ void OnStart(service_manager::ServiceContext* context) override;
bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override;
@@ -46,6 +51,8 @@ class TaskViewer : public service_manager::Service,
void Create(const service_manager::Identity& remote_identity,
mojom::LaunchableRequest request) override;
+ service_manager::ServiceContext* context_ = nullptr;
+
mojo::BindingSet<mojom::Launchable> bindings_;
std::vector<views::Widget*> windows_;
« no previous file with comments | « mash/session/session.cc ('k') | mash/task_viewer/task_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698