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

Unified Diff: ipc/ipc_sync_channel.cc

Issue 1991323002: Send input event IPCs directly from the UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index de54755f8924cd64d7c9181b809ae32d9cb9de18..efc008a03abbb4684f6247e83689d609dbf2917c 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -605,4 +605,36 @@ void SyncChannel::OnChannelInit() {
pre_init_sync_message_filters_.clear();
}
+bool SyncChannel::SendNow(std::unique_ptr<Message> message) {
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ std::string name;
+ Logging::GetInstance()->GetMessageText(
+ message->type(), &name, message.get(), nullptr);
+ TRACE_EVENT1("ipc", "SyncChannel::SendNow", "name", name);
+#else
+ TRACE_EVENT2("ipc", "SyncChannel::SendNow",
+ "class", IPC_MESSAGE_ID_CLASS(message->type()),
+ "line", IPC_MESSAGE_ID_LINE(message->type()));
+#endif
+ if (!message->is_sync())
+ return ChannelProxy::SendNow(std::move(message));
+ return Send(message.release());
+}
+
+bool SyncChannel::SendOnIPCThread(std::unique_ptr<Message> message) {
+#ifdef IPC_MESSAGE_LOG_ENABLED
+ std::string name;
+ Logging::GetInstance()->GetMessageText(
+ message->type(), &name, message.get(), nullptr);
+ TRACE_EVENT1("ipc", "SyncChannel::SendOnIPCThread", "name", name);
+#else
+ TRACE_EVENT2("ipc", "SyncChannel::SendOnIPCThread",
+ "class", IPC_MESSAGE_ID_CLASS(message->type()),
+ "line", IPC_MESSAGE_ID_LINE(message->type()));
+#endif
+ if (!message->is_sync())
+ return ChannelProxy::SendOnIPCThread(std::move(message));
+ return Send(message.release());
+}
+
} // namespace IPC
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698