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 "remoting/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "remoting/client/chromoting_view.h" | 8 #include "remoting/client/chromoting_view.h" |
9 #include "remoting/client/host_connection.h" | 9 #include "remoting/client/host_connection.h" |
10 | 10 |
11 static const uint32 kCreatedColor = 0xff0000ff; | 11 static const uint32 kCreatedColor = 0xffccccff; |
12 static const uint32 kDisconnectedColor = 0xff00ff00; | 12 static const uint32 kDisconnectedColor = 0xff00ccff; |
13 static const uint32 kFailedColor = 0xffff0000; | 13 static const uint32 kFailedColor = 0xffcc00ff; |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 | 16 |
17 ChromotingClient::ChromotingClient(MessageLoop* message_loop, | 17 ChromotingClient::ChromotingClient(MessageLoop* message_loop, |
18 HostConnection* connection, | 18 HostConnection* connection, |
19 ChromotingView* view) | 19 ChromotingView* view) |
20 : message_loop_(message_loop), | 20 : message_loop_(message_loop), |
21 state_(CREATED), | 21 state_(CREATED), |
22 host_connection_(connection), | 22 host_connection_(connection), |
23 view_(view) { | 23 view_(view) { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 void ChromotingClient::DoHandleUpdate(HostMessage* msg) { | 156 void ChromotingClient::DoHandleUpdate(HostMessage* msg) { |
157 DCHECK_EQ(message_loop(), MessageLoop::current()); | 157 DCHECK_EQ(message_loop(), MessageLoop::current()); |
158 DCHECK(msg->has_update_stream_packet()); | 158 DCHECK(msg->has_update_stream_packet()); |
159 | 159 |
160 view_->HandleUpdateStreamPacket(msg); | 160 view_->HandleUpdateStreamPacket(msg); |
161 } | 161 } |
162 | 162 |
163 void ChromotingClient::DoEndUpdate(HostMessage* msg) { | 163 void ChromotingClient::DoEndUpdate(HostMessage* msg) { |
164 DCHECK_EQ(message_loop(), MessageLoop::current()); | 164 DCHECK_EQ(message_loop(), MessageLoop::current()); |
165 DCHECK(msg->has_update_stream_packet()); | 165 DCHECK(msg->has_end_update_stream()); |
166 | 166 |
167 view_->HandleUpdateStreamPacket(msg); | 167 view_->HandleEndUpdateStream(msg); |
168 } | 168 } |
169 | 169 |
170 } // namespace remoting | 170 } // namespace remoting |
OLD | NEW |