OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 clients_.push_back(client); | 314 clients_.push_back(client); |
315 } | 315 } |
316 | 316 |
317 void ChromotingHost::set_protocol_config( | 317 void ChromotingHost::set_protocol_config( |
318 protocol::CandidateSessionConfig* config) { | 318 protocol::CandidateSessionConfig* config) { |
319 DCHECK(config_.get()); | 319 DCHECK(config_.get()); |
320 DCHECK_EQ(state_, kInitial); | 320 DCHECK_EQ(state_, kInitial); |
321 protocol_config_.reset(config); | 321 protocol_config_.reset(config); |
322 } | 322 } |
323 | 323 |
324 void ChromotingHost::LocalMouseMoved(const gfx::Point& new_pos) { | 324 void ChromotingHost::LocalMouseMoved(const SkIPoint& new_pos) { |
325 if (!context_->network_message_loop()->BelongsToCurrentThread()) { | 325 if (!context_->network_message_loop()->BelongsToCurrentThread()) { |
326 context_->network_message_loop()->PostTask( | 326 context_->network_message_loop()->PostTask( |
327 FROM_HERE, base::Bind(&ChromotingHost::LocalMouseMoved, this, new_pos)); | 327 FROM_HERE, base::Bind(&ChromotingHost::LocalMouseMoved, this, new_pos)); |
328 return; | 328 return; |
329 } | 329 } |
330 ClientList::iterator client; | 330 ClientList::iterator client; |
331 for (client = clients_.begin(); client != clients_.end(); ++client) { | 331 for (client = clients_.begin(); client != clients_.end(); ++client) { |
332 client->get()->LocalMouseMoved(new_pos); | 332 client->get()->LocalMouseMoved(new_pos); |
333 } | 333 } |
334 } | 334 } |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 | 639 |
640 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); | 640 for (std::vector<Task*>::iterator it = shutdown_tasks_.begin(); |
641 it != shutdown_tasks_.end(); ++it) { | 641 it != shutdown_tasks_.end(); ++it) { |
642 (*it)->Run(); | 642 (*it)->Run(); |
643 delete *it; | 643 delete *it; |
644 } | 644 } |
645 shutdown_tasks_.clear(); | 645 shutdown_tasks_.clear(); |
646 } | 646 } |
647 | 647 |
648 } // namespace remoting | 648 } // namespace remoting |
OLD | NEW |