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

Unified Diff: remoting/protocol/input_sender.h

Issue 7218061: Close all writers before JingleSession is destroyed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years, 6 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/protocol/host_control_sender.cc ('k') | remoting/protocol/input_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/input_sender.h
diff --git a/remoting/protocol/input_sender.h b/remoting/protocol/input_sender.h
index db7bd6d02bb9369bc7976b38264e9102af18e6af..5abcb331bb5de446af1a1ab12a0b3c375125a7fa 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);
« no previous file with comments | « remoting/protocol/host_control_sender.cc ('k') | remoting/protocol/input_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698