diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 23:23:30 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 23:23:30 +0000 |
commit | 86dbc72dd6030f7796ac602279fab6ad85eeca60 (patch) | |
tree | 6f4eafd5ed6d7b00437f23bf2c797b841783a8b8 /remoting/protocol/input_sender.h | |
parent | 44d461e80c337d7baa8b9b9055d3b17ee7bc66b6 (diff) | |
download | chromium_src-86dbc72dd6030f7796ac602279fab6ad85eeca60.zip chromium_src-86dbc72dd6030f7796ac602279fab6ad85eeca60.tar.gz chromium_src-86dbc72dd6030f7796ac602279fab6ad85eeca60.tar.bz2 |
Close all writers before JingleSession is destroyed.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7218061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/input_sender.h')
-rw-r--r-- | remoting/protocol/input_sender.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/remoting/protocol/input_sender.h b/remoting/protocol/input_sender.h index db7bd6d02..5abcb33 100644 --- a/remoting/protocol/input_sender.h +++ b/remoting/protocol/input_sender.h @@ -28,6 +28,9 @@ namespace protocol { class BufferedSocketWriter; +// Implementation of InputStub that sends messages on a socket. Must +// be created and closed on the network thread, but can be used on any +// other thread. class InputSender : public InputStub { public: // Create a stub using a socket. @@ -38,6 +41,10 @@ class InputSender : public InputStub { virtual void InjectKeyEvent(const KeyEvent* event, Task* done); virtual void InjectMouseEvent(const MouseEvent* event, Task* done); + // Stop writing. Must be called on the network thread when the + // underlying socket is being destroyed. + void Close(); + private: // Helper method to run the task and delete it afterwards. void RunTask(Task* done); |