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

Unified Diff: services/ui/demo/mus_demo_service.cc

Issue 2440453002: Splitting the Mus demo code out of a service. (Closed)
Patch Set: Addressed @sky comments and synced 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
« no previous file with comments | « services/ui/demo/mus_demo_service.h ('k') | services/ui/public/cpp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/demo/mus_demo_service.cc
diff --git a/services/ui/demo/mus_demo_service.cc b/services/ui/demo/mus_demo_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cb6c5ad874fbc00aa62ce3066612d4fc2ea878f5
--- /dev/null
+++ b/services/ui/demo/mus_demo_service.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include "services/ui/demo/mus_demo_service.h"
+
+#include "base/memory/ptr_util.h"
+#include "services/ui/demo/mus_demo.h"
+
+namespace ui {
+namespace demo {
+
+MusDemoService::MusDemoService() : mus_demo_(base::MakeUnique<MusDemo>()) {}
+
+MusDemoService::~MusDemoService() {}
+
+void MusDemoService::OnStart(const service_manager::Identity& identity) {
+ mus_demo_->Start(connector());
+}
+
+bool MusDemoService::OnConnect(const service_manager::Identity& remote_identity,
+ service_manager::InterfaceRegistry* registry) {
+ return true;
+}
+
+} // namespace demo
+} // namespace ui
« no previous file with comments | « services/ui/demo/mus_demo_service.h ('k') | services/ui/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698