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

Unified Diff: remoting/host/desktop_session_agent.cc

Issue 11447021: Added support of Secure Attention Sequence in multiprocess mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years 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
index bb5024d9be9d1bb8172307e9f338d7288ea36279..53dacedbeb4ec7c06d594c11b1dfe5c1a1592004 100644
--- a/remoting/host/desktop_session_agent.cc
+++ b/remoting/host/desktop_session_agent.cc
@@ -60,6 +60,9 @@ void DesktopSesssionClipboardStub::InjectClipboardEvent(
} // namespace
+DesktopSessionAgent::Delegate::~Delegate() {
+}
+
DesktopSessionAgent::~DesktopSessionAgent() {
DCHECK(!network_channel_);
DCHECK(!video_capturer_);
@@ -100,7 +103,8 @@ void DesktopSessionAgent::OnChannelError() {
network_channel_.reset();
// Notify the caller that the channel has been disconnected.
- disconnected_task_.Run();
+ if (delegate_.get())
+ delegate_->OnNetworkProcessDisconnected();
}
scoped_refptr<SharedBuffer> DesktopSessionAgent::CreateSharedBuffer(
@@ -188,19 +192,19 @@ void DesktopSessionAgent::InjectClipboardEvent(
new ChromotingDesktopNetworkMsg_InjectClipboardEvent(serialized_event));
}
-bool DesktopSessionAgent::Start(const base::Closure& disconnected_task,
+bool DesktopSessionAgent::Start(const base::WeakPtr<Delegate>& delegate,
IPC::PlatformFileForTransit* desktop_pipe_out) {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
+ DCHECK(delegate_.get() == NULL);
- disconnected_task_ = disconnected_task;
+ delegate_ = delegate;
// Create an IPC channel to communicate with the network process.
if (!CreateChannelForNetworkProcess(desktop_pipe_out, &network_channel_))
return false;
// Create and start the event executor.
- event_executor_ = EventExecutor::Create(input_task_runner(),
- caller_task_runner());
+ event_executor_ = CreateEventExecutor();
scoped_ptr<protocol::ClipboardStub> clipboard_stub(
new DesktopSesssionClipboardStub(this));
event_executor_->Start(clipboard_stub.Pass());
@@ -214,6 +218,8 @@ bool DesktopSessionAgent::Start(const base::Closure& disconnected_task,
void DesktopSessionAgent::Stop() {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
+ delegate_.reset();
+
// Make sure the channel is closed.
network_channel_.reset();
« 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