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

Side by Side Diff: ipc/mojo/ipc_channel_mojo.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/mojo/ipc_channel_mojo.h" 5 #include "ipc/mojo/ipc_channel_mojo.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 if (!message_reader_->Send(base::WrapUnique(message))) { 340 if (!message_reader_->Send(base::WrapUnique(message))) {
341 OnPipeError(); 341 OnPipeError();
342 return false; 342 return false;
343 } 343 }
344 344
345 return true; 345 return true;
346 } 346 }
347 347
348 bool ChannelMojo::IsSendThreadSafe() const { 348 bool ChannelMojo::IsSendThreadSafe() const {
349 return false; 349 return true;
piman 2016/05/24 17:24:51 I also noted that SyncMessageFilter will also skip
Ken Rockot(use gerrit already) 2016/05/24 18:00:08 Thanks, forgot about SyncMessageFilter. So for now
350 } 350 }
351 351
352 base::ProcessId ChannelMojo::GetPeerPID() const { 352 base::ProcessId ChannelMojo::GetPeerPID() const {
353 base::AutoLock lock(lock_); 353 base::AutoLock lock(lock_);
354 if (!message_reader_) 354 if (!message_reader_)
355 return base::kNullProcessId; 355 return base::kNullProcessId;
356 356
357 return message_reader_->GetPeerPid(); 357 return message_reader_->GetPeerPid();
358 } 358 }
359 359
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 DCHECK(ok); 431 DCHECK(ok);
432 if (!ok) { 432 if (!ok) {
433 LOG(ERROR) << "Failed to add new Mojo handle."; 433 LOG(ERROR) << "Failed to add new Mojo handle.";
434 return MOJO_RESULT_UNKNOWN; 434 return MOJO_RESULT_UNKNOWN;
435 } 435 }
436 } 436 }
437 return MOJO_RESULT_OK; 437 return MOJO_RESULT_OK;
438 } 438 }
439 439
440 } // namespace IPC 440 } // namespace IPC
OLDNEW
« content/browser/renderer_host/render_process_host_impl.cc ('K') | « ipc/ipc_channel_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698