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

Unified Diff: mojo/shell/application_manager_apptest_target.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
« no previous file with comments | « mojo/shell/application_manager_apptest_driver.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_apptest_target.cc
diff --git a/mojo/shell/application_manager_apptest_target.cc b/mojo/shell/application_manager_apptest_target.cc
index 32a6b12f666314254b95121af23c57db1d93ccc3..24676088763da3a5ac011b6af4d02d8bcac98015 100644
--- a/mojo/shell/application_manager_apptest_target.cc
+++ b/mojo/shell/application_manager_apptest_target.cc
@@ -8,7 +8,7 @@
#include "mojo/shell/application_manager_apptests.mojom.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/shell.h"
#include "mojo/shell/runner/child/test_native_main.h"
#include "mojo/shell/runner/init.h"
@@ -23,14 +23,11 @@ class TargetApplicationDelegate : public mojo::ApplicationDelegate {
private:
// mojo::ApplicationDelegate:
- void Initialize(mojo::ApplicationImpl* app) override {
+ void Initialize(mojo::Shell* shell, const std::string& url,
+ uint32_t id) override {
CreateInstanceForHandleTestPtr service;
- app->ConnectToService("mojo:mojo_shell_apptests", &service);
- service->SetTargetID(app->id());
- }
- bool AcceptConnection(
- mojo::ApplicationConnection* connection) override {
- return true;
+ shell->ConnectToService("mojo:mojo_shell_apptests", &service);
+ service->SetTargetID(id);
}
DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate);
« no previous file with comments | « mojo/shell/application_manager_apptest_driver.cc ('k') | mojo/shell/application_package_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698