Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Unified Diff: remoting/host/desktop_session_agent.cc

Issue 11231060: [Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_session_agent.h ('k') | remoting/host/desktop_session_agent_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_agent.cc
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc
new file mode 100644
index 0000000000000000000000000000000000000000..36643695a99f0b5360ffd63b0154fa1b3549cc31
--- /dev/null
+++ b/remoting/host/desktop_session_agent.cc
@@ -0,0 +1,61 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/host/desktop_session_agent.h"
+
+#include "base/logging.h"
+#include "ipc/ipc_channel_proxy.h"
+#include "ipc/ipc_message.h"
+#include "ipc/ipc_message_macros.h"
+#include "remoting/base/auto_thread_task_runner.h"
+#include "remoting/host/chromoting_messages.h"
+
+namespace remoting {
+
+DesktopSessionAgent::~DesktopSessionAgent() {
+ DCHECK(caller_task_runner()->BelongsToCurrentThread());
+}
+
+bool DesktopSessionAgent::OnMessageReceived(const IPC::Message& message) {
+ DCHECK(caller_task_runner()->BelongsToCurrentThread());
+
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void DesktopSessionAgent::OnChannelConnected(int32 peer_pid) {
+ DCHECK(caller_task_runner()->BelongsToCurrentThread());
+
+ VLOG(1) << "IPC: desktop <- network (" << peer_pid << ")";
+
+ NOTIMPLEMENTED();
+}
+
+void DesktopSessionAgent::OnChannelError() {
+ DCHECK(caller_task_runner()->BelongsToCurrentThread());
+
+ // Make sure the channel is closed.
+ network_channel_.reset();
+
+ // Notify the caller that |this| can be destroyed now.
+ done_task_.Run();
+}
+
+bool DesktopSessionAgent::Start(const base::Closure& done_task,
+ IPC::PlatformFileForTransit* desktop_pipe_out) {
+ DCHECK(caller_task_runner()->BelongsToCurrentThread());
+
+ done_task_ = done_task;
+ return DoCreateNetworkChannel(desktop_pipe_out, &network_channel_);
+}
+
+DesktopSessionAgent::DesktopSessionAgent(
+ scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
+ scoped_refptr<AutoThreadTaskRunner> io_task_runner)
+ : caller_task_runner_(caller_task_runner),
+ io_task_runner_(io_task_runner) {
+ DCHECK(caller_task_runner_->BelongsToCurrentThread());
+}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/desktop_session_agent.h ('k') | remoting/host/desktop_session_agent_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698