| 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/desktop_process.h" | 8 #include "remoting/host/desktop_process.h" |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool DesktopProcess::OnMessageReceived(const IPC::Message& message) { | 56 bool DesktopProcess::OnMessageReceived(const IPC::Message& message) { |
| 57 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 57 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 58 | 58 |
| 59 bool handled = true; | 59 bool handled = true; |
| 60 IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) | 60 IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) |
| 61 IPC_MESSAGE_HANDLER(ChromotingDaemonDesktopMsg_Crash, OnCrash) | 61 IPC_MESSAGE_HANDLER(ChromotingDaemonDesktopMsg_Crash, OnCrash) |
| 62 IPC_MESSAGE_UNHANDLED(handled = false) | 62 IPC_MESSAGE_UNHANDLED(handled = false) |
| 63 IPC_END_MESSAGE_MAP() | 63 IPC_END_MESSAGE_MAP() |
| 64 |
| 65 CHECK(handled) << "Received unexpected IPC type: " << message.type(); |
| 64 return handled; | 66 return handled; |
| 65 } | 67 } |
| 66 | 68 |
| 67 void DesktopProcess::OnChannelConnected(int32 peer_pid) { | 69 void DesktopProcess::OnChannelConnected(int32 peer_pid) { |
| 68 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 70 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 69 | 71 |
| 70 VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; | 72 VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; |
| 71 } | 73 } |
| 72 | 74 |
| 73 void DesktopProcess::OnChannelError() { | 75 void DesktopProcess::OnChannelError() { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 147 } |
| 146 | 148 |
| 147 void DesktopProcess::OnCrash(const std::string& function_name, | 149 void DesktopProcess::OnCrash(const std::string& function_name, |
| 148 const std::string& file_name, | 150 const std::string& file_name, |
| 149 const int& line_number) { | 151 const int& line_number) { |
| 150 // The daemon requested us to crash the process. | 152 // The daemon requested us to crash the process. |
| 151 CHECK(false); | 153 CHECK(false); |
| 152 } | 154 } |
| 153 | 155 |
| 154 } // namespace remoting | 156 } // namespace remoting |
| OLD | NEW |