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

Unified Diff: mojo/shell/public/cpp/lib/application_runner.cc

Issue 1772503002: Revert of [mojo-bindings] Use Watch API instead of MessagePumpMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/public/cpp/BUILD.gn ('k') | mojo/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/application_runner.cc
diff --git a/mojo/shell/public/cpp/lib/application_runner.cc b/mojo/shell/public/cpp/lib/application_runner.cc
index dd9be48f3401c27be453e4fbb5a433ae44140044..3a358608c2a5b759f4e4ef65cc52d699fd3623a9 100644
--- a/mojo/shell/public/cpp/lib/application_runner.cc
+++ b/mojo/shell/public/cpp/lib/application_runner.cc
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/process/launch.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/public/cpp/shell_connection.h"
@@ -19,7 +20,7 @@
ApplicationRunner::ApplicationRunner(ShellClient* client)
: client_(scoped_ptr<ShellClient>(client)),
- message_loop_type_(base::MessageLoop::TYPE_DEFAULT),
+ message_loop_type_(base::MessageLoop::TYPE_CUSTOM),
has_run_(false) {}
ApplicationRunner::~ApplicationRunner() {}
@@ -48,7 +49,10 @@
{
scoped_ptr<base::MessageLoop> loop;
- loop.reset(new base::MessageLoop(message_loop_type_));
+ if (message_loop_type_ == base::MessageLoop::TYPE_CUSTOM)
+ loop.reset(new base::MessageLoop(common::MessagePumpMojo::Create()));
+ else
+ loop.reset(new base::MessageLoop(message_loop_type_));
connection_.reset(new ShellConnection(
client_.get(),
« no previous file with comments | « mojo/shell/public/cpp/BUILD.gn ('k') | mojo/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698