OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "remoting/protocol/client_event_dispatcher.h" | 5 #include "remoting/protocol/client_event_dispatcher.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "net/socket/stream_socket.h" | 8 #include "net/socket/stream_socket.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/proto/event.pb.h" | 10 #include "remoting/proto/event.pb.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 writer()->Write(SerializeAndFrameMessage(message), base::Closure()); | 45 writer()->Write(SerializeAndFrameMessage(message), base::Closure()); |
46 } | 46 } |
47 | 47 |
48 void ClientEventDispatcher::InjectTouchEvent(const TouchEvent& event) { | 48 void ClientEventDispatcher::InjectTouchEvent(const TouchEvent& event) { |
49 EventMessage message; | 49 EventMessage message; |
50 message.set_timestamp(base::TimeTicks::Now().ToInternalValue()); | 50 message.set_timestamp(base::TimeTicks::Now().ToInternalValue()); |
51 message.mutable_touch_event()->CopyFrom(event); | 51 message.mutable_touch_event()->CopyFrom(event); |
52 writer()->Write(SerializeAndFrameMessage(message), base::Closure()); | 52 writer()->Write(SerializeAndFrameMessage(message), base::Closure()); |
53 } | 53 } |
54 | 54 |
| 55 void ClientEventDispatcher::OnIncomingMessage( |
| 56 scoped_ptr<CompoundBuffer> message) { |
| 57 LOG(ERROR) << "Received unexpected message on the event channel."; |
| 58 } |
| 59 |
55 } // namespace protocol | 60 } // namespace protocol |
56 } // namespace remoting | 61 } // namespace remoting |
OLD | NEW |