| OLD | NEW |
| 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/ipc_mojo_bootstrap.h" | 5 #include "ipc/ipc_mojo_bootstrap.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 DCHECK(thread_checker_.CalledOnValidThread()); | 63 DCHECK(thread_checker_.CalledOnValidThread()); |
| 64 DCHECK(task_runner_->BelongsToCurrentThread()); | 64 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 65 | 65 |
| 66 connector_.reset(new mojo::Connector( | 66 connector_.reset(new mojo::Connector( |
| 67 std::move(handle), mojo::Connector::SINGLE_THREADED_SEND, | 67 std::move(handle), mojo::Connector::SINGLE_THREADED_SEND, |
| 68 task_runner_)); | 68 task_runner_)); |
| 69 connector_->set_incoming_receiver(&filters_); | 69 connector_->set_incoming_receiver(&filters_); |
| 70 connector_->set_connection_error_handler( | 70 connector_->set_connection_error_handler( |
| 71 base::Bind(&ChannelAssociatedGroupController::OnPipeError, | 71 base::Bind(&ChannelAssociatedGroupController::OnPipeError, |
| 72 base::Unretained(this))); | 72 base::Unretained(this))); |
| 73 connector_->SetWatcherHeapProfilerTag("IPC Channel"); |
| 73 } | 74 } |
| 74 | 75 |
| 75 void Pause() { | 76 void Pause() { |
| 76 DCHECK(!paused_); | 77 DCHECK(!paused_); |
| 77 paused_ = true; | 78 paused_ = true; |
| 78 } | 79 } |
| 79 | 80 |
| 80 void Unpause() { | 81 void Unpause() { |
| 81 DCHECK(paused_); | 82 DCHECK(paused_); |
| 82 paused_ = false; | 83 paused_ = false; |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 Channel::Mode mode, | 878 Channel::Mode mode, |
| 878 Delegate* delegate, | 879 Delegate* delegate, |
| 879 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) { | 880 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) { |
| 880 return base::MakeUnique<MojoBootstrapImpl>( | 881 return base::MakeUnique<MojoBootstrapImpl>( |
| 881 std::move(handle), delegate, | 882 std::move(handle), delegate, |
| 882 new ChannelAssociatedGroupController(mode == Channel::MODE_SERVER, | 883 new ChannelAssociatedGroupController(mode == Channel::MODE_SERVER, |
| 883 ipc_task_runner)); | 884 ipc_task_runner)); |
| 884 } | 885 } |
| 885 | 886 |
| 886 } // namespace IPC | 887 } // namespace IPC |
| OLD | NEW |