OLD | NEW |
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 #include "net/base/io_buffer.h" | 5 #include "net/base/io_buffer.h" |
6 #include "remoting/base/multiple_array_input_stream.h" | 6 #include "remoting/base/multiple_array_input_stream.h" |
7 #include "remoting/proto/control.pb.h" | 7 #include "remoting/proto/control.pb.h" |
8 #include "remoting/proto/event.pb.h" | 8 #include "remoting/proto/event.pb.h" |
9 #include "remoting/protocol/chromotocol_connection.h" | 9 #include "remoting/protocol/chromotocol_connection.h" |
10 #include "remoting/protocol/host_message_dispatcher.h" | 10 #include "remoting/protocol/host_message_dispatcher.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 connection->event_channel(), | 39 connection->event_channel(), |
40 NewCallback(this, &HostMessageDispatcher::OnEventMessageReceived)); | 40 NewCallback(this, &HostMessageDispatcher::OnEventMessageReceived)); |
41 control_message_reader_->Init<ClientControlMessage>( | 41 control_message_reader_->Init<ClientControlMessage>( |
42 connection->control_channel(), | 42 connection->control_channel(), |
43 NewCallback(this, &HostMessageDispatcher::OnControlMessageReceived)); | 43 NewCallback(this, &HostMessageDispatcher::OnControlMessageReceived)); |
44 return true; | 44 return true; |
45 } | 45 } |
46 | 46 |
47 void HostMessageDispatcher::OnControlMessageReceived( | 47 void HostMessageDispatcher::OnControlMessageReceived( |
48 ClientControlMessage* message) { | 48 ClientControlMessage* message) { |
49 scoped_refptr<RefCountedMessage<ClientControlMessage> > ref_msg = | 49 scoped_refptr<RefCountedMessage<ClientControlMessage> > ref_msg( |
50 new RefCountedMessage<ClientControlMessage>(message); | 50 new RefCountedMessage<ClientControlMessage>(message)); |
51 if (message->has_suggest_screen_resolution_request()) { | 51 if (message->has_suggest_screen_resolution_request()) { |
52 control_message_handler_->OnSuggestScreenResolutionRequest( | 52 control_message_handler_->OnSuggestScreenResolutionRequest( |
53 message->suggest_screen_resolution_request(), | 53 message->suggest_screen_resolution_request(), |
54 NewRunnableFunction( | 54 NewRunnableFunction( |
55 &DeleteMessage<RefCountedMessage<ClientControlMessage> >, | 55 &DeleteMessage<RefCountedMessage<ClientControlMessage> >, |
56 ref_msg)); | 56 ref_msg)); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 void HostMessageDispatcher::OnEventMessageReceived( | 60 void HostMessageDispatcher::OnEventMessageReceived( |
61 ClientEventMessage* message) { | 61 ClientEventMessage* message) { |
62 // TODO(hclam): Implement. | 62 // TODO(hclam): Implement. |
63 } | 63 } |
64 | 64 |
65 } // namespace remoting | 65 } // namespace remoting |
OLD | NEW |