| 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 "content/browser/mojo/mojo_application_host.h" | 5 #include "content/browser/mojo/mojo_application_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/common/mojo/mojo_messages.h" | 10 #include "content/common/mojo/mojo_messages.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 return true; | 74 return true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void MojoApplicationHost::Activate(IPC::Sender* sender, | 77 void MojoApplicationHost::Activate(IPC::Sender* sender, |
| 78 base::ProcessHandle process_handle) { | 78 base::ProcessHandle process_handle) { |
| 79 DCHECK(!did_activate_); | 79 DCHECK(!did_activate_); |
| 80 DCHECK(client_handle_.is_valid()); | 80 DCHECK(client_handle_.is_valid()); |
| 81 | 81 |
| 82 base::PlatformFile client_file = client_handle_.release().handle; | 82 base::PlatformFile client_file = client_handle_.release().handle; |
| 83 did_activate_ = sender->Send(new MojoMsg_Activate( | 83 did_activate_ = sender->Send(new MojoMsg_Activate( |
| 84 IPC::GetFileHandleForProcess(client_file, process_handle, true))); | 84 IPC::GetPlatformFileForTransit(client_file, true))); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void MojoApplicationHost::OverrideIOTaskRunnerForTest( | 87 void MojoApplicationHost::OverrideIOTaskRunnerForTest( |
| 88 scoped_refptr<base::TaskRunner> io_task_runner) { | 88 scoped_refptr<base::TaskRunner> io_task_runner) { |
| 89 io_task_runner_override_ = io_task_runner; | 89 io_task_runner_override_ = io_task_runner; |
| 90 } | 90 } |
| 91 | 91 |
| 92 | 92 |
| 93 } // namespace content | 93 } // namespace content |
| OLD | NEW |