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

Unified Diff: mojo/services/test_service/test_service_application.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
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
Index: mojo/services/test_service/test_service_application.cc
diff --git a/mojo/services/test_service/test_service_application.cc b/mojo/services/test_service/test_service_application.cc
index 67b651554aa8b7e303847ee73b5e03c2a74c77ed..0f82eb920481acdc32c1043e93f941a55a33c895 100644
--- a/mojo/services/test_service/test_service_application.cc
+++ b/mojo/services/test_service/test_service_application.cc
@@ -17,14 +17,15 @@ namespace mojo {
namespace test {
TestServiceApplication::TestServiceApplication()
- : ref_count_(0), app_impl_(nullptr) {
+ : ref_count_(0), shell_(nullptr) {
}
TestServiceApplication::~TestServiceApplication() {
}
-void TestServiceApplication::Initialize(ApplicationImpl* app) {
- app_impl_ = app;
+void TestServiceApplication::Initialize(Shell* shell, const std::string& url,
+ uint32_t id) {
+ shell_ = shell;
}
bool TestServiceApplication::AcceptConnection(
@@ -36,13 +37,13 @@ bool TestServiceApplication::AcceptConnection(
void TestServiceApplication::Create(ApplicationConnection* connection,
InterfaceRequest<TestService> request) {
- new TestServiceImpl(app_impl_, this, std::move(request));
+ new TestServiceImpl(shell_, this, std::move(request));
AddRef();
}
void TestServiceApplication::Create(ApplicationConnection* connection,
InterfaceRequest<TestTimeService> request) {
- new TestTimeServiceImpl(app_impl_, std::move(request));
+ new TestTimeServiceImpl(shell_, std::move(request));
}
void TestServiceApplication::AddRef() {
« no previous file with comments | « mojo/services/test_service/test_service_application.h ('k') | mojo/services/test_service/test_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698