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

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 95c63243793a12c19c1b1d3bf5d2e0efc858402a..7a7b407ffd4b26c51261e011eb033e9b0a0c6e03 100644
--- a/components/mus/public/cpp/lib/window_tree_client.cc
+++ b/components/mus/public/cpp/lib/window_tree_client.cc
@@ -30,6 +30,8 @@
namespace mus {
+void DeleteWindowTreeClient(WindowTreeClient* client) { delete client; }
+
Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) {
return (client_id << 16) | local_id;
}
@@ -688,7 +690,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_,
« no previous file with comments | « components/mus/public/cpp/lib/command_buffer_client_impl.cc ('k') | components/safe_json/safe_json_parser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698