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

Unified Diff: remoting/host/desktop_session_agent.h

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_process.cc ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_agent.h
diff --git a/remoting/host/desktop_session_agent.h b/remoting/host/desktop_session_agent.h
index d7d5c9003afe5aa4b62c3abd6ce24308c7d4c4e9..96c23cc98469771a8d367d15cac15a8bfb7291ea 100644
--- a/remoting/host/desktop_session_agent.h
+++ b/remoting/host/desktop_session_agent.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_platform_file.h"
#include "remoting/base/shared_buffer.h"
@@ -38,6 +39,18 @@ class DesktopSessionAgent
public SharedBufferFactory,
public VideoFrameCapturer::Delegate {
public:
+ class Delegate {
+ public:
+ virtual ~Delegate();
+
+ // Notifies the delegate that the network-to-desktop channel has been
+ // disconnected.
+ virtual void OnNetworkProcessDisconnected() = 0;
+
+ // Request the delegate to inject Secure Attention Sequence.
+ virtual void InjectSas() = 0;
+ };
+
static scoped_refptr<DesktopSessionAgent> Create(
scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
scoped_refptr<AutoThreadTaskRunner> input_task_runner,
@@ -66,10 +79,7 @@ class DesktopSessionAgent
// Creates desktop integration components and a connected IPC channel to be
// used to access them. The client end of the channel is returned in
// the variable pointed by |desktop_pipe_out|.
- //
- // |disconnected_task| is invoked on |caller_task_runner_| to notify
- // the caller that the network-to-desktop channel has been disconnected.
- bool Start(const base::Closure& disconnected_task,
+ bool Start(const base::WeakPtr<Delegate>& delegate,
IPC::PlatformFileForTransit* desktop_pipe_out);
// Stops the agent asynchronously.
@@ -91,6 +101,9 @@ class DesktopSessionAgent
IPC::PlatformFileForTransit* client_out,
scoped_ptr<IPC::ChannelProxy>* server_out) = 0;
+ // Creates an event executor specific to the platform.
+ virtual scoped_ptr<EventExecutor> CreateEventExecutor() = 0;
+
// Handles CaptureFrame requests from the client.
void OnCaptureFrame();
@@ -132,6 +145,10 @@ class DesktopSessionAgent
return video_capture_task_runner_;
}
+ const base::WeakPtr<Delegate>& delegate() const {
+ return delegate_;
+ }
+
private:
// Task runner on which public methods of this class should be called.
scoped_refptr<AutoThreadTaskRunner> caller_task_runner_;
@@ -145,9 +162,7 @@ class DesktopSessionAgent
// Task runner dedicated to running methods of |video_capturer_|.
scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner_;
- // Runs on |caller_task_runner_| to notify the caller that the network-to-
- // desktop channel has been disconnected.
- base::Closure disconnected_task_;
+ base::WeakPtr<Delegate> delegate_;
// Executes keyboard, mouse and clipboard events.
scoped_ptr<EventExecutor> event_executor_;
« no previous file with comments | « remoting/host/desktop_process.cc ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698