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

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

Issue 2192263002: MojoMain() -> ServiceMain() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « services/shell/tests/lifecycle/app.cc ('k') | services/shell/tests/lifecycle/parent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/c/system/main.h"
11 #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"
12 #include "services/shell/public/cpp/service_context.h" 12 #include "services/shell/public/cpp/service_context.h"
13 #include "services/shell/public/cpp/service_runner.h" 13 #include "services/shell/public/cpp/service_runner.h"
14 #include "services/shell/public/interfaces/service_factory.mojom.h" 14 #include "services/shell/public/interfaces/service_factory.mojom.h"
15 #include "services/shell/tests/lifecycle/app_client.h" 15 #include "services/shell/tests/lifecycle/app_client.h"
16 #include "services/shell/tests/lifecycle/lifecycle_unittest.mojom.h" 16 #include "services/shell/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>,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 shell::test::AppClient app_client_; 138 shell::test::AppClient app_client_;
139 int shell_connection_refcount_ = 0; 139 int shell_connection_refcount_ = 0;
140 mojo::BindingSet<shell::mojom::ServiceFactory> bindings_; 140 mojo::BindingSet<shell::mojom::ServiceFactory> bindings_;
141 std::vector<PackagedApp*> apps_; 141 std::vector<PackagedApp*> apps_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(Package); 143 DISALLOW_COPY_AND_ASSIGN(Package);
144 }; 144 };
145 145
146 } // namespace 146 } // namespace
147 147
148 MojoResult MojoMain(MojoHandle shell_handle) { 148 MojoResult ServiceMain(MojoHandle service_request_handle) {
149 Package* package = new Package; 149 Package* package = new Package;
150 shell::ServiceRunner runner(package); 150 shell::ServiceRunner runner(package);
151 package->set_runner(&runner); 151 package->set_runner(&runner);
152 return runner.Run(shell_handle); 152 return runner.Run(service_request_handle);
153 } 153 }
OLDNEW
« no previous file with comments | « services/shell/tests/lifecycle/app.cc ('k') | services/shell/tests/lifecycle/parent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698