| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cast_extension_session.h" | 5 #include "remoting/host/cast_extension_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 network_settings_(network_settings), | 319 network_settings_(network_settings), |
| 320 client_session_control_(client_session_control), | 320 client_session_control_(client_session_control), |
| 321 client_stub_(client_stub), | 321 client_stub_(client_stub), |
| 322 stats_observer_(CastStatsObserver::Create()), | 322 stats_observer_(CastStatsObserver::Create()), |
| 323 received_offer_(false), | 323 received_offer_(false), |
| 324 has_grabbed_capturer_(false), | 324 has_grabbed_capturer_(false), |
| 325 signaling_thread_wrapper_(NULL), | 325 signaling_thread_wrapper_(NULL), |
| 326 worker_thread_wrapper_(NULL), | 326 worker_thread_wrapper_(NULL), |
| 327 worker_thread_(kWorkerThreadName) { | 327 worker_thread_(kWorkerThreadName) { |
| 328 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 328 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 329 DCHECK(url_request_context_getter_); | 329 DCHECK(url_request_context_getter_.get()); |
| 330 DCHECK(client_session_control_); | 330 DCHECK(client_session_control_); |
| 331 DCHECK(client_stub_); | 331 DCHECK(client_stub_); |
| 332 | 332 |
| 333 // The worker thread is created with base::MessageLoop::TYPE_IO because | 333 // The worker thread is created with base::MessageLoop::TYPE_IO because |
| 334 // the PeerConnection performs some port allocation operations on this thread | 334 // the PeerConnection performs some port allocation operations on this thread |
| 335 // that require it. See crbug.com/404013. | 335 // that require it. See crbug.com/404013. |
| 336 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); | 336 base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); |
| 337 worker_thread_.StartWithOptions(options); | 337 worker_thread_.StartWithOptions(options); |
| 338 worker_task_runner_ = worker_thread_.task_runner(); | 338 worker_task_runner_ = worker_thread_.task_runner(); |
| 339 } | 339 } |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 std::string json_str; | 666 std::string json_str; |
| 667 if (!base::JSONWriter::Write(json.get(), &json_str)) { | 667 if (!base::JSONWriter::Write(json.get(), &json_str)) { |
| 668 LOG(ERROR) << "Failed to serialize candidate message."; | 668 LOG(ERROR) << "Failed to serialize candidate message."; |
| 669 return; | 669 return; |
| 670 } | 670 } |
| 671 SendMessageToClient(kSubjectNewCandidate, json_str); | 671 SendMessageToClient(kSubjectNewCandidate, json_str); |
| 672 } | 672 } |
| 673 | 673 |
| 674 } // namespace remoting | 674 } // namespace remoting |
| 675 | 675 |
| OLD | NEW |