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

Side by Side Diff: services/service_manager/tests/lifecycle/parent.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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.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/connector.h" 12 #include "services/service_manager/public/cpp/connector.h"
13 #include "services/shell/public/cpp/interface_factory.h" 13 #include "services/service_manager/public/cpp/interface_factory.h"
14 #include "services/shell/public/cpp/interface_registry.h" 14 #include "services/service_manager/public/cpp/interface_registry.h"
15 #include "services/shell/public/cpp/service.h" 15 #include "services/service_manager/public/cpp/service.h"
16 #include "services/shell/public/cpp/service_runner.h" 16 #include "services/service_manager/public/cpp/service_runner.h"
17 #include "services/shell/tests/lifecycle/lifecycle_unittest.mojom.h" 17 #include "services/service_manager/tests/lifecycle/lifecycle_unittest.mojom.h"
18 18
19 namespace { 19 namespace {
20 20
21 void QuitLoop(base::RunLoop* loop) { 21 void QuitLoop(base::RunLoop* loop) {
22 loop->Quit(); 22 loop->Quit();
23 } 23 }
24 24
25 class Parent : public shell::Service, 25 class Parent : public shell::Service,
26 public shell::InterfaceFactory<shell::test::mojom::Parent>, 26 public shell::InterfaceFactory<shell::test::mojom::Parent>,
27 public shell::test::mojom::Parent { 27 public shell::test::mojom::Parent {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 DISALLOW_COPY_AND_ASSIGN(Parent); 70 DISALLOW_COPY_AND_ASSIGN(Parent);
71 }; 71 };
72 72
73 } // namespace 73 } // namespace
74 74
75 MojoResult ServiceMain(MojoHandle service_request_handle) { 75 MojoResult ServiceMain(MojoHandle service_request_handle) {
76 Parent* parent = new Parent; 76 Parent* parent = new Parent;
77 return shell::ServiceRunner(parent).Run(service_request_handle); 77 return shell::ServiceRunner(parent).Run(service_request_handle);
78 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698