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

Unified Diff: mojo/shell/application_manager_unittest.cc

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 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 | « mojo/shell/application_manager_apptest_target.cc ('k') | mojo/shell/application_package_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager_unittest.cc
diff --git a/mojo/shell/application_manager_unittest.cc b/mojo/shell/application_manager_unittest.cc
index 94b92c66c0bac88204047ea5e538ab135bc80474..a673347dc24748a6d368f845833734e06af67f1e 100644
--- a/mojo/shell/application_manager_unittest.cc
+++ b/mojo/shell/application_manager_unittest.cc
@@ -17,10 +17,9 @@
#include "mojo/shell/connect_util.h"
#include "mojo/shell/fetcher.h"
#include "mojo/shell/package_manager.h"
-#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_delegate.h"
#include "mojo/shell/public/cpp/application_impl.h"
#include "mojo/shell/public/cpp/interface_factory.h"
+#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/public/interfaces/service_provider.mojom.h"
#include "mojo/shell/test.mojom.h"
#include "mojo/shell/test_package_manager.h"
@@ -95,7 +94,7 @@ class TestClient {
};
class TestApplicationLoader : public ApplicationLoader,
- public ApplicationDelegate,
+ public ShellClient,
public InterfaceFactory<TestService> {
public:
TestApplicationLoader()
@@ -119,15 +118,15 @@ class TestApplicationLoader : public ApplicationLoader,
test_app_.reset(new ApplicationImpl(this, std::move(application_request)));
}
- // ApplicationDelegate implementation.
- bool AcceptConnection(ApplicationConnection* connection) override {
+ // mojo::ShellClient implementation.
+ bool AcceptConnection(Connection* connection) override {
connection->AddService<TestService>(this);
last_requestor_url_ = GURL(connection->GetRemoteApplicationURL());
return true;
}
// InterfaceFactory<TestService> implementation.
- void Create(ApplicationConnection* connection,
+ void Create(Connection* connection,
InterfaceRequest<TestService> request) override {
new TestServiceImpl(context_, std::move(request));
}
@@ -277,7 +276,7 @@ class TestAImpl : public TestA {
test_context_->QuitSoon();
}
- scoped_ptr<ApplicationConnection> connection_;
+ scoped_ptr<Connection> connection_;
TesterContext* test_context_;
TestBPtr b_;
StrongBinding<TestA> binding_;
@@ -285,7 +284,7 @@ class TestAImpl : public TestA {
class TestBImpl : public TestB {
public:
- TestBImpl(ApplicationConnection* connection,
+ TestBImpl(Connection* connection,
TesterContext* test_context,
InterfaceRequest<TestB> request)
: test_context_(test_context), binding_(this, std::move(request)) {
@@ -317,7 +316,7 @@ class TestBImpl : public TestB {
class TestCImpl : public TestC {
public:
- TestCImpl(ApplicationConnection* connection,
+ TestCImpl(Connection* connection,
TesterContext* test_context,
InterfaceRequest<TestC> request)
: test_context_(test_context), binding_(this, std::move(request)) {}
@@ -334,7 +333,7 @@ class TestCImpl : public TestC {
StrongBinding<TestC> binding_;
};
-class Tester : public ApplicationDelegate,
+class Tester : public ShellClient,
public ApplicationLoader,
public InterfaceFactory<TestA>,
public InterfaceFactory<TestB>,
@@ -350,7 +349,7 @@ class Tester : public ApplicationDelegate,
app_.reset(new ApplicationImpl(this, std::move(application_request)));
}
- bool AcceptConnection(ApplicationConnection* connection) override {
+ bool AcceptConnection(Connection* connection) override {
if (!requestor_url_.empty() &&
requestor_url_ != connection->GetRemoteApplicationURL()) {
context_->set_tester_called_quit();
@@ -366,18 +365,18 @@ class Tester : public ApplicationDelegate,
return true;
}
- void Create(ApplicationConnection* connection,
+ void Create(Connection* connection,
InterfaceRequest<TestA> request) override {
a_bindings_.push_back(
new TestAImpl(app_.get(), context_, std::move(request), this));
}
- void Create(ApplicationConnection* connection,
+ void Create(Connection* connection,
InterfaceRequest<TestB> request) override {
new TestBImpl(connection, context_, std::move(request));
}
- void Create(ApplicationConnection* connection,
+ void Create(Connection* connection,
InterfaceRequest<TestC> request) override {
new TestCImpl(connection, context_, std::move(request));
}
« no previous file with comments | « mojo/shell/application_manager_apptest_target.cc ('k') | mojo/shell/application_package_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698