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

Side by Side Diff: services/service_manager/tests/lifecycle/package.cc

Issue 2419063003: Move services/shell to services/service_manager (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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <memory> 6 #include <memory>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "mojo/public/cpp/bindings/binding_set.h" 10 #include "mojo/public/cpp/bindings/binding_set.h"
11 #include "services/shell/public/c/main.h" 11 #include "services/service_manager/public/c/main.h"
12 #include "services/shell/public/cpp/service_context.h" 12 #include "services/service_manager/public/cpp/service_context.h"
13 #include "services/shell/public/cpp/service_runner.h" 13 #include "services/service_manager/public/cpp/service_runner.h"
14 #include "services/shell/public/interfaces/service_factory.mojom.h" 14 #include "services/service_manager/public/interfaces/service_factory.mojom.h"
15 #include "services/shell/tests/lifecycle/app_client.h" 15 #include "services/service_manager/tests/lifecycle/app_client.h"
16 #include "services/shell/tests/lifecycle/lifecycle_unittest.mojom.h" 16 #include "services/service_manager/tests/lifecycle/lifecycle_unittest.mojom.h"
17 17
18 namespace { 18 namespace {
19 19
20 class PackagedApp : public shell::Service, 20 class PackagedApp : public shell::Service,
21 public shell::InterfaceFactory<LifecycleControl>, 21 public shell::InterfaceFactory<LifecycleControl>,
22 public LifecycleControl { 22 public LifecycleControl {
23 public: 23 public:
24 using DestructCallback = base::Callback<void(PackagedApp*)>; 24 using DestructCallback = base::Callback<void(PackagedApp*)>;
25 25
26 PackagedApp(shell::mojom::ServiceRequest request, 26 PackagedApp(shell::mojom::ServiceRequest request,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 }; 146 };
147 147
148 } // namespace 148 } // namespace
149 149
150 MojoResult ServiceMain(MojoHandle service_request_handle) { 150 MojoResult ServiceMain(MojoHandle service_request_handle) {
151 Package* package = new Package; 151 Package* package = new Package;
152 shell::ServiceRunner runner(package); 152 shell::ServiceRunner runner(package);
153 package->set_runner(&runner); 153 package->set_runner(&runner);
154 return runner.Run(service_request_handle); 154 return runner.Run(service_request_handle);
155 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698