OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "remoting/host/win/wts_session_process_delegate.h" | 8 #include "remoting/host/win/wts_session_process_delegate.h" |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 event_handler_ = nullptr; | 548 event_handler_ = nullptr; |
549 event_handler->OnFatalError(); | 549 event_handler->OnFatalError(); |
550 } | 550 } |
551 | 551 |
552 void WtsSessionProcessDelegate::Core::ReportProcessLaunched( | 552 void WtsSessionProcessDelegate::Core::ReportProcessLaunched( |
553 base::win::ScopedHandle worker_process, | 553 base::win::ScopedHandle worker_process, |
554 mojo::edk::ScopedPlatformHandle server_handle) { | 554 mojo::edk::ScopedPlatformHandle server_handle) { |
555 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 555 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
556 DCHECK(!worker_process_.IsValid()); | 556 DCHECK(!worker_process_.IsValid()); |
557 | 557 |
558 process_connection_->Connect(worker_process.Get(), std::move(server_handle)); | 558 process_connection_->Connect( |
| 559 worker_process.Get(), |
| 560 mojo::edk::ConnectionParams(std::move(server_handle))); |
559 process_connection_.reset(); | 561 process_connection_.reset(); |
560 worker_process_ = std::move(worker_process); | 562 worker_process_ = std::move(worker_process); |
561 | 563 |
562 // Report a handle that can be used to wait for the worker process completion, | 564 // Report a handle that can be used to wait for the worker process completion, |
563 // query information about the process and duplicate handles. | 565 // query information about the process and duplicate handles. |
564 DWORD desired_access = | 566 DWORD desired_access = |
565 SYNCHRONIZE | PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION; | 567 SYNCHRONIZE | PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION; |
566 HANDLE temp_handle; | 568 HANDLE temp_handle; |
567 if (!DuplicateHandle(GetCurrentProcess(), worker_process_.Get(), | 569 if (!DuplicateHandle(GetCurrentProcess(), worker_process_.Get(), |
568 GetCurrentProcess(), &temp_handle, desired_access, FALSE, | 570 GetCurrentProcess(), &temp_handle, desired_access, FALSE, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 | 606 |
605 void WtsSessionProcessDelegate::CloseChannel() { | 607 void WtsSessionProcessDelegate::CloseChannel() { |
606 core_->CloseChannel(); | 608 core_->CloseChannel(); |
607 } | 609 } |
608 | 610 |
609 void WtsSessionProcessDelegate::KillProcess() { | 611 void WtsSessionProcessDelegate::KillProcess() { |
610 core_->KillProcess(); | 612 core_->KillProcess(); |
611 } | 613 } |
612 | 614 |
613 } // namespace remoting | 615 } // namespace remoting |
OLD | NEW |