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/client_context.h" | 9 #include "remoting/client/client_context.h" |
10 #include "remoting/client/host_connection.h" | 10 #include "remoting/client/host_connection.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 if (message_loop() != MessageLoop::current()) { | 53 if (message_loop() != MessageLoop::current()) { |
54 message_loop()->PostTask( | 54 message_loop()->PostTask( |
55 FROM_HERE, | 55 FROM_HERE, |
56 NewRunnableMethod(this, &ChromotingClient::Stop)); | 56 NewRunnableMethod(this, &ChromotingClient::Stop)); |
57 return; | 57 return; |
58 } | 58 } |
59 | 59 |
60 connection_->Disconnect(); | 60 connection_->Disconnect(); |
61 | 61 |
62 view_->TearDown(); | 62 view_->TearDown(); |
63 | |
64 // Quit the current message loop. | |
65 message_loop()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); | |
66 } | 63 } |
67 | 64 |
68 void ChromotingClient::ClientDone() { | 65 void ChromotingClient::ClientDone() { |
69 if (client_done_ != NULL) { | 66 if (client_done_ != NULL) { |
70 message_loop()->PostTask(FROM_HERE, client_done_); | 67 message_loop()->PostTask(FROM_HERE, client_done_); |
71 } | 68 } |
72 } | 69 } |
73 | 70 |
74 void ChromotingClient::Repaint() { | 71 void ChromotingClient::Repaint() { |
75 if (message_loop() != MessageLoop::current()) { | 72 if (message_loop() != MessageLoop::current()) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 203 } |
207 | 204 |
208 void ChromotingClient::EndUpdate(ChromotingHostMessage* msg) { | 205 void ChromotingClient::EndUpdate(ChromotingHostMessage* msg) { |
209 DCHECK_EQ(message_loop(), MessageLoop::current()); | 206 DCHECK_EQ(message_loop(), MessageLoop::current()); |
210 DCHECK(msg->has_end_update_stream()); | 207 DCHECK(msg->has_end_update_stream()); |
211 | 208 |
212 view_->HandleEndUpdateStream(msg); | 209 view_->HandleEndUpdateStream(msg); |
213 } | 210 } |
214 | 211 |
215 } // namespace remoting | 212 } // namespace remoting |
OLD | NEW |