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/compound_buffer.h" | 9 #include "remoting/base/compound_buffer.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 void ClientEventDispatcher::InjectTouchEvent(const TouchEvent& event) { | 46 void ClientEventDispatcher::InjectTouchEvent(const TouchEvent& event) { |
47 EventMessage message; | 47 EventMessage message; |
48 message.set_timestamp(base::TimeTicks::Now().ToInternalValue()); | 48 message.set_timestamp(base::TimeTicks::Now().ToInternalValue()); |
49 message.mutable_touch_event()->CopyFrom(event); | 49 message.mutable_touch_event()->CopyFrom(event); |
50 message_pipe()->Send(&message, base::Closure()); | 50 message_pipe()->Send(&message, base::Closure()); |
51 } | 51 } |
52 | 52 |
53 void ClientEventDispatcher::OnIncomingMessage( | 53 void ClientEventDispatcher::OnIncomingMessage( |
54 scoped_ptr<CompoundBuffer> message) { | 54 std::unique_ptr<CompoundBuffer> message) { |
55 LOG(ERROR) << "Received unexpected message on the event channel."; | 55 LOG(ERROR) << "Received unexpected message on the event channel."; |
56 } | 56 } |
57 | 57 |
58 } // namespace protocol | 58 } // namespace protocol |
59 } // namespace remoting | 59 } // namespace remoting |
OLD | NEW |