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

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: 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
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..9c53f576ba59f753eaec95d7ee0da3839027a5ad 100644
--- a/remoting/host/desktop_session_agent.h
+++ b/remoting/host/desktop_session_agent.h
@@ -38,6 +38,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,
@@ -65,12 +77,9 @@ 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,
- IPC::PlatformFileForTransit* desktop_pipe_out);
+ // the variable pointed by |desktop_pipe_out|. |delegate| must be valid until
+ // Stop() is called.
Jamie 2012/12/06 21:42:25 Would it be possible/sensible to use refcounting t
alexeypa (please no reviews) 2012/12/06 21:56:02 Using Start()/Stop() methods with a requirement to
+ bool Start(Delegate* delegate, IPC::PlatformFileForTransit* desktop_pipe_out);
// Stops the agent asynchronously.
void Stop();
@@ -91,6 +100,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 +144,10 @@ class DesktopSessionAgent
return video_capture_task_runner_;
}
+ 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 +161,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_;
+ Delegate* delegate_;
// Executes keyboard, mouse and clipboard events.
scoped_ptr<EventExecutor> event_executor_;

Powered by Google App Engine
This is Rietveld 408576698