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

Unified Diff: mash/example/window_type_launcher/window_type_launcher.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
Index: mash/example/window_type_launcher/window_type_launcher.h
diff --git a/mash/example/window_type_launcher/window_type_launcher.h b/mash/example/window_type_launcher/window_type_launcher.h
index 75f1624325e56bbe1ce4646c7f5da2f7203907e4..f0bd664339e58ad41cf35308c2a59cc71e15df29 100644
--- a/mash/example/window_type_launcher/window_type_launcher.h
+++ b/mash/example/window_type_launcher/window_type_launcher.h
@@ -10,8 +10,13 @@
#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"
+namespace service_manager {
+class ServiceContext;
+}
+
namespace views {
class AuraInit;
class Widget;
@@ -30,7 +35,7 @@ class WindowTypeLauncher
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;
@@ -41,6 +46,8 @@ class WindowTypeLauncher
void Create(const service_manager::Identity& remote_identity,
mash::mojom::LaunchableRequest request) override;
+ service_manager::ServiceContext* context_ = nullptr;
+
mojo::BindingSet<mash::mojom::Launchable> bindings_;
std::vector<views::Widget*> windows_;
« no previous file with comments | « mash/example/views_examples/views_examples.cc ('k') | mash/example/window_type_launcher/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698