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

Unified Diff: content/public/test/test_mojo_app.cc

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
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 cc8017506bb16aed88dbc396ec086b7f16a2cf22..4fb1b271d4479272f9b91bee70cffdc2ab409373 100644
--- a/content/public/test/test_mojo_app.cc
+++ b/content/public/test/test_mojo_app.cc
@@ -7,24 +7,20 @@
#include <utility>
#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
#include "mojo/shell/public/cpp/connection.h"
-#include "mojo/shell/public/cpp/shell.h"
+#include "mojo/shell/public/cpp/connector.h"
namespace content {
const char kTestMojoAppUrl[] = "system:content_mojo_test";
-TestMojoApp::TestMojoApp() : service_binding_(this), shell_(nullptr) {
+TestMojoApp::TestMojoApp() : service_binding_(this) {
}
TestMojoApp::~TestMojoApp() {
}
-void TestMojoApp::Initialize(mojo::Shell* shell, const std::string& url,
- uint32_t id, uint32_t user_id) {
- shell_ = shell;
-}
-
bool TestMojoApp::AcceptConnection(mojo::Connection* connection) {
requestor_url_ = GURL(connection->GetRemoteApplicationURL());
connection->AddInterface<TestMojoService>(this);
@@ -39,8 +35,7 @@ void TestMojoApp::Create(mojo::Connection* connection,
void TestMojoApp::DoSomething(const DoSomethingCallback& callback) {
callback.Run();
- DCHECK(shell_);
- shell_->Quit();
+ base::MessageLoop::current()->QuitWhenIdle();
}
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