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

Side by Side Diff: remoting/protocol/input_sender.cc

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, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/input_sender.h ('k') | remoting/protocol/protobuf_video_writer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This stub is thread safe because of the use of BufferedSocketWriter. 5 // This stub is thread safe because of the use of BufferedSocketWriter.
6 // BufferedSocketWriter buffers messages and send them on them right thread. 6 // BufferedSocketWriter buffers messages and send them on them right thread.
7 7
8 #include "remoting/protocol/input_sender.h" 8 #include "remoting/protocol/input_sender.h"
9 9
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 22 matching lines...) Expand all
33 buffered_writer_->Write(SerializeAndFrameMessage(message), done); 33 buffered_writer_->Write(SerializeAndFrameMessage(message), done);
34 } 34 }
35 35
36 void InputSender::InjectMouseEvent(const MouseEvent* event, Task* done) { 36 void InputSender::InjectMouseEvent(const MouseEvent* event, Task* done) {
37 EventMessage message; 37 EventMessage message;
38 message.set_sequence_number(base::Time::Now().ToInternalValue()); 38 message.set_sequence_number(base::Time::Now().ToInternalValue());
39 message.mutable_mouse_event()->CopyFrom(*event); 39 message.mutable_mouse_event()->CopyFrom(*event);
40 buffered_writer_->Write(SerializeAndFrameMessage(message), done); 40 buffered_writer_->Write(SerializeAndFrameMessage(message), done);
41 } 41 }
42 42
43 void InputSender::Close() {
44 buffered_writer_->Close();
45 }
46
43 } // namespace protocol 47 } // namespace protocol
44 } // namespace remoting 48 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/input_sender.h ('k') | remoting/protocol/protobuf_video_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698