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

Unified Diff: remoting/host/wts_session_process_launcher_win.h

Issue 9617027: Chromoting: Implemented security attention sequence (SAS) emulation on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 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/simple_host_process.cc ('k') | remoting/host/wts_session_process_launcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/wts_session_process_launcher_win.h
diff --git a/remoting/host/wts_session_process_launcher_win.h b/remoting/host/wts_session_process_launcher_win.h
index eaf9c67d666641e7f9ebb02929e71f358a73d8a1..efcb93a75d01f1b72eeefb70304ec2c0b6e71577 100644
--- a/remoting/host/wts_session_process_launcher_win.h
+++ b/remoting/host/wts_session_process_launcher_win.h
@@ -15,29 +15,49 @@
#include "base/timer.h"
#include "base/win/scoped_handle.h"
#include "base/win/object_watcher.h"
+#include "ipc/ipc_channel.h"
#include "remoting/host/wts_console_observer_win.h"
+namespace base {
+
+class Thread;
+
+} // namespace base
+
+namespace IPC {
+
+class ChannelProxy;
+class Message;
+
+} // namespace IPC
+
namespace remoting {
+class SasInjector;
class WtsConsoleMonitor;
class WtsSessionProcessLauncher
: public base::win::ObjectWatcher::Delegate,
+ public IPC::Channel::Listener,
public WtsConsoleObserver {
public:
- // Constructs a WtsSessionProcessLauncher object. |monitor| must outlive this
- // class. |host_binary| is the name of the executable to be launched in
- // the console session.
+ // Constructs a WtsSessionProcessLauncher object. |monitor| and |io_thread|
+ // must outlive this object. |host_binary| is the name of the executable to
+ // be launched in the console session.
WtsSessionProcessLauncher(WtsConsoleMonitor* monitor,
- const FilePath& host_binary);
+ const FilePath& host_binary,
+ base::Thread* io_thread);
virtual ~WtsSessionProcessLauncher();
- // base::win::ObjectWatcher::Delegate implementation
+ // base::win::ObjectWatcher::Delegate implementation.
virtual void OnObjectSignaled(HANDLE object) OVERRIDE;
- // WtsConsoleObserver implementation
+ // IPC::Channel::Listener implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // WtsConsoleObserver implementation.
virtual void OnSessionAttached(uint32 session_id) OVERRIDE;
virtual void OnSessionDetached() OVERRIDE;
@@ -47,6 +67,10 @@ class WtsSessionProcessLauncher
// reason.
void LaunchProcess();
+ // Sends the Secure Attention Sequence to the session represented by
+ // |session_token_|.
+ void OnSendSasToConsole();
+
// Name of the host executable.
FilePath host_binary_;
@@ -59,6 +83,10 @@ class WtsSessionProcessLauncher
// Timer used to schedule the next attempt to launch the process.
base::OneShotTimer<WtsSessionProcessLauncher> timer_;
+ // The I/O thread hosts the Chromoting IPC channel and any other code
+ // requiring an I/O message loop.
+ base::Thread* io_thread_;
+
// This pointer is used to unsubscribe from session attach and detach events.
WtsConsoleMonitor* monitor_;
@@ -84,6 +112,12 @@ class WtsSessionProcessLauncher
// Current state of the process launcher.
State state_;
+ // The Chromoting IPC channel connecting the service to the per-session
+ // process.
+ scoped_ptr<IPC::ChannelProxy> chromoting_channel_;
+
+ scoped_ptr<SasInjector> sas_injector_;
+
DISALLOW_COPY_AND_ASSIGN(WtsSessionProcessLauncher);
};
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/host/wts_session_process_launcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698