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

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

Issue 1797153002: Reinstate wait-for-Initialize when Chrome is run in Mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell-client
Patch Set: fix views_mus_unittests too 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/edk/embedder/embedder.cc ('k') | mojo/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/shell_connection.cc
diff --git a/mojo/shell/public/cpp/lib/shell_connection.cc b/mojo/shell/public/cpp/lib/shell_connection.cc
index 7c8b032093e4bba9d3ccf5eb95654e2a68b5bfbf..d1cba7ea31e040427ad194fdf369945085bf2962 100644
--- a/mojo/shell/public/cpp/lib/shell_connection.cc
+++ b/mojo/shell/public/cpp/lib/shell_connection.cc
@@ -32,6 +32,10 @@ ShellConnection::ShellConnection(mojo::ShellClient* client,
ShellConnection::~ShellConnection() {}
+void ShellConnection::set_initialize_handler(const base::Closure& callback) {
+ initialize_handler_ = callback;
+}
+
void ShellConnection::SetAppTestConnectorForTesting(
shell::mojom::ConnectorPtr connector) {
pending_connector_request_ = nullptr;
@@ -44,6 +48,9 @@ void ShellConnection::SetAppTestConnectorForTesting(
void ShellConnection::Initialize(shell::mojom::IdentityPtr identity,
uint32_t id,
const InitializeCallback& callback) {
+ if (!initialize_handler_.is_null())
+ initialize_handler_.Run();
+
callback.Run(std::move(pending_connector_request_));
DCHECK(binding_.is_bound());
« no previous file with comments | « mojo/edk/embedder/embedder.cc ('k') | mojo/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698