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

Unified Diff: content/public/test/test_mojo_app.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 | « content/public/test/test_mojo_app.h ('k') | content/renderer/mus/render_widget_mus_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_mojo_app.cc
diff --git a/content/public/test/test_mojo_app.cc b/content/public/test/test_mojo_app.cc
index bd929d6391bc456a64b06ec90ab4448d96a6b15b..fe9b875cfe58a6ef7bbeae2b56f62724e9ddc380 100644
--- a/content/public/test/test_mojo_app.cc
+++ b/content/public/test/test_mojo_app.cc
@@ -8,20 +8,21 @@
#include "base/logging.h"
#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
namespace content {
const char kTestMojoAppUrl[] = "system:content_mojo_test";
-TestMojoApp::TestMojoApp() : service_binding_(this), app_(nullptr) {
+TestMojoApp::TestMojoApp() : service_binding_(this), shell_(nullptr) {
}
TestMojoApp::~TestMojoApp() {
}
-void TestMojoApp::Initialize(mojo::ApplicationImpl* app) {
- app_ = app;
+void TestMojoApp::Initialize(mojo::Shell* shell, const std::string& url,
+ uint32_t id) {
+ shell_ = shell;
}
bool TestMojoApp::AcceptConnection(
@@ -39,8 +40,8 @@ void TestMojoApp::Create(mojo::ApplicationConnection* connection,
void TestMojoApp::DoSomething(const DoSomethingCallback& callback) {
callback.Run();
- DCHECK(app_);
- app_->Quit();
+ DCHECK(shell_);
+ shell_->Quit();
}
void TestMojoApp::GetRequestorURL(const GetRequestorURLCallback& callback) {
« no previous file with comments | « content/public/test/test_mojo_app.h ('k') | content/renderer/mus/render_widget_mus_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698