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

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

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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/lifecycle_exe.cc ('k') | services/shell/tests/lifecycle/parent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/tests/lifecycle/package.cc
diff --git a/services/shell/tests/lifecycle/package.cc b/services/shell/tests/lifecycle/package.cc
index 8e0c28e3920b80ff5984b3524eae58bbec108b03..cfac449b9a972f78691db65eb2dc96c128c14f5c 100644
--- a/services/shell/tests/lifecycle/package.cc
+++ b/services/shell/tests/lifecycle/package.cc
@@ -11,19 +11,19 @@
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/shell/public/cpp/application_runner.h"
#include "services/shell/public/cpp/shell_connection.h"
-#include "services/shell/public/interfaces/shell_client_factory.mojom.h"
+#include "services/shell/public/interfaces/service_factory.mojom.h"
#include "services/shell/tests/lifecycle/app_client.h"
#include "services/shell/tests/lifecycle/lifecycle_unittest.mojom.h"
namespace {
-class PackagedApp : public shell::ShellClient,
+class PackagedApp : public shell::Service,
public shell::InterfaceFactory<LifecycleControl>,
public LifecycleControl {
public:
using DestructCallback = base::Callback<void(PackagedApp*)>;
- PackagedApp(shell::mojom::ShellClientRequest request,
+ PackagedApp(shell::mojom::ServiceRequest request,
const DestructCallback& shell_connection_closed_callback,
const DestructCallback& destruct_callback)
: connection_(new shell::ShellConnection(this, std::move(request))),
@@ -37,8 +37,8 @@ class PackagedApp : public shell::ShellClient,
}
private:
- // shell::ShellClient:
- bool AcceptConnection(shell::Connection* connection) override {
+ // shell::Service:
+ bool OnConnect(shell::Connection* connection) override {
connection->AddInterface<LifecycleControl>(this);
return true;
}
@@ -86,9 +86,9 @@ class PackagedApp : public shell::ShellClient,
};
class Package
- : public shell::ShellClient,
- public shell::InterfaceFactory<shell::mojom::ShellClientFactory>,
- public shell::mojom::ShellClientFactory {
+ : public shell::Service,
+ public shell::InterfaceFactory<shell::mojom::ServiceFactory>,
+ public shell::mojom::ServiceFactory {
public:
Package() {}
~Package() override {}
@@ -99,19 +99,19 @@ class Package
private:
// shell::test::AppClient:
- bool AcceptConnection(shell::Connection* connection) override {
- connection->AddInterface<shell::mojom::ShellClientFactory>(this);
- return app_client_.AcceptConnection(connection);
+ bool OnConnect(shell::Connection* connection) override {
+ connection->AddInterface<shell::mojom::ServiceFactory>(this);
+ return app_client_.OnConnect(connection);
}
- // shell::InterfaceFactory<shell::mojom::ShellClientFactory>:
+ // shell::InterfaceFactory<shell::mojom::ServiceFactory>:
void Create(shell::Connection* connection,
- shell::mojom::ShellClientFactoryRequest request) override {
+ shell::mojom::ServiceFactoryRequest request) override {
bindings_.AddBinding(this, std::move(request));
}
- // shell::mojom::ShellClientFactory:
- void CreateShellClient(shell::mojom::ShellClientRequest request,
+ // shell::mojom::ServiceFactory:
+ void CreateService(shell::mojom::ServiceRequest request,
const mojo::String& name) override {
++shell_connection_refcount_;
apps_.push_back(
@@ -137,7 +137,7 @@ class Package
shell::test::AppClient app_client_;
int shell_connection_refcount_ = 0;
- mojo::BindingSet<shell::mojom::ShellClientFactory> bindings_;
+ mojo::BindingSet<shell::mojom::ServiceFactory> bindings_;
std::vector<PackagedApp*> apps_;
DISALLOW_COPY_AND_ASSIGN(Package);
« no previous file with comments | « services/shell/tests/lifecycle/lifecycle_exe.cc ('k') | services/shell/tests/lifecycle/parent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698