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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 std::string mojo_pipe_token = mojo::edk::GenerateRandomToken(); | 394 std::string mojo_pipe_token = mojo::edk::GenerateRandomToken(); |
395 broker_client_invitation_ = | 395 broker_client_invitation_ = |
396 base::MakeUnique<mojo::edk::OutgoingBrokerClientInvitation>(); | 396 base::MakeUnique<mojo::edk::OutgoingBrokerClientInvitation>(); |
397 std::unique_ptr<IPC::ChannelProxy> channel = IPC::ChannelProxy::Create( | 397 std::unique_ptr<IPC::ChannelProxy> channel = IPC::ChannelProxy::Create( |
398 broker_client_invitation_->AttachMessagePipe(mojo_pipe_token).release(), | 398 broker_client_invitation_->AttachMessagePipe(mojo_pipe_token).release(), |
399 IPC::Channel::MODE_SERVER, this, io_task_runner_); | 399 IPC::Channel::MODE_SERVER, this, io_task_runner_); |
400 command_line.AppendSwitchASCII(kMojoPipeToken, mojo_pipe_token); | 400 command_line.AppendSwitchASCII(kMojoPipeToken, mojo_pipe_token); |
401 | 401 |
402 std::unique_ptr<mojo::edk::PlatformChannelPair> normal_mojo_channel; | 402 std::unique_ptr<mojo::edk::PlatformChannelPair> normal_mojo_channel; |
403 std::unique_ptr<mojo::edk::NamedPlatformChannelPair> elevated_mojo_channel; | 403 std::unique_ptr<mojo::edk::NamedPlatformChannelPair> elevated_mojo_channel; |
404 base::HandlesToInheritVector handles_to_inherit; | 404 std::vector<HANDLE> handles_to_inherit; |
405 if (launch_elevated_) { | 405 if (launch_elevated_) { |
406 // Pass the name of the IPC channel to use. | 406 // Pass the name of the IPC channel to use. |
407 mojo::edk::NamedPlatformChannelPair::Options options; | 407 mojo::edk::NamedPlatformChannelPair::Options options; |
408 options.security_descriptor = base::UTF8ToUTF16(channel_security_); | 408 options.security_descriptor = base::UTF8ToUTF16(channel_security_); |
409 elevated_mojo_channel = | 409 elevated_mojo_channel = |
410 base::MakeUnique<mojo::edk::NamedPlatformChannelPair>(options); | 410 base::MakeUnique<mojo::edk::NamedPlatformChannelPair>(options); |
411 elevated_mojo_channel->PrepareToPassClientHandleToChildProcess( | 411 elevated_mojo_channel->PrepareToPassClientHandleToChildProcess( |
412 &command_line); | 412 &command_line); |
413 } else { | 413 } else { |
414 normal_mojo_channel = base::MakeUnique<mojo::edk::PlatformChannelPair>(); | 414 normal_mojo_channel = base::MakeUnique<mojo::edk::PlatformChannelPair>(); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 610 |
611 void WtsSessionProcessDelegate::CloseChannel() { | 611 void WtsSessionProcessDelegate::CloseChannel() { |
612 core_->CloseChannel(); | 612 core_->CloseChannel(); |
613 } | 613 } |
614 | 614 |
615 void WtsSessionProcessDelegate::KillProcess() { | 615 void WtsSessionProcessDelegate::KillProcess() { |
616 core_->KillProcess(); | 616 core_->KillProcess(); |
617 } | 617 } |
618 | 618 |
619 } // namespace remoting | 619 } // namespace remoting |
OLD | NEW |