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

Unified Diff: services/shell/tests/lifecycle/app_client.cc

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase 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/shell/tests/lifecycle/app_client.h ('k') | services/shell/tests/lifecycle/app_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/tests/lifecycle/app_client.cc
diff --git a/services/shell/tests/lifecycle/app_client.cc b/services/shell/tests/lifecycle/app_client.cc
deleted file mode 100644
index 59502d3198c9628cf96b8df2ab009ea72b7fbea7..0000000000000000000000000000000000000000
--- a/services/shell/tests/lifecycle/app_client.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// 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/shell/tests/lifecycle/app_client.h"
-
-#include "services/shell/public/cpp/interface_registry.h"
-#include "services/shell/public/cpp/service_context.h"
-
-namespace shell {
-namespace test {
-
-AppClient::AppClient() {}
-AppClient::AppClient(shell::mojom::ServiceRequest request)
- : context_(new ServiceContext(this, std::move(request))) {}
-AppClient::~AppClient() {}
-
-bool AppClient::OnConnect(const Identity& remote_identity,
- InterfaceRegistry* registry) {
- registry->AddInterface<LifecycleControl>(this);
- return true;
-}
-
-void AppClient::Create(const Identity& remote_identity,
- LifecycleControlRequest request) {
- bindings_.AddBinding(this, std::move(request));
-}
-
-void AppClient::Ping(const PingCallback& callback) {
- callback.Run();
-}
-
-void AppClient::GracefulQuit() {
- base::MessageLoop::current()->QuitWhenIdle();
-}
-
-void AppClient::Crash() {
- // Rather than actually crash, which causes a bunch of console spray and
- // maybe UI clutter on some platforms, just exit without shutting anything
- // down properly.
- exit(1);
-}
-
-void AppClient::CloseShellConnection() {
- DCHECK(runner_);
- runner_->DestroyServiceContext();
- // Quit the app once the caller goes away.
- bindings_.set_connection_error_handler(
- base::Bind(&AppClient::BindingLost, base::Unretained(this)));
-}
-
-void AppClient::BindingLost() {
- if (bindings_.empty())
- GracefulQuit();
-}
-
-} // namespace test
-} // namespace shell
-
-
« no previous file with comments | « services/shell/tests/lifecycle/app_client.h ('k') | services/shell/tests/lifecycle/app_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698