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

Unified Diff: components/mus/public/cpp/lib/window_tree_client.cc

Issue 2062333002: mojo::Callback -> base::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
Index: components/mus/public/cpp/lib/window_tree_client.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client.cc b/components/mus/public/cpp/lib/window_tree_client.cc
index 5ed5eaec5c8d40b160d3158bacb485012b64075c..e7b22888feeb3c6c83dab5ca69b437f939929ae9 100644
--- a/components/mus/public/cpp/lib/window_tree_client.cc
+++ b/components/mus/public/cpp/lib/window_tree_client.cc
@@ -28,6 +28,8 @@
namespace mus {
+void DeleteWindowTreeClient(WindowTreeClient* client) { delete client; }
+
Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) {
return (client_id << 16) | local_id;
}
@@ -644,7 +646,8 @@ void WindowTreeClient::OnEmbed(ClientSpecificId client_id,
bool drawn) {
DCHECK(!tree_ptr_);
tree_ptr_ = std::move(tree);
- tree_ptr_.set_connection_error_handler([this]() { delete this; });
+ tree_ptr_.set_connection_error_handler(
+ base::Bind(&DeleteWindowTreeClient, this));
if (window_manager_delegate_) {
tree_ptr_->GetWindowManagerClient(GetProxy(&window_manager_internal_client_,

Powered by Google App Engine
This is Rietveld 408576698