| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/client/core/blimp_client_context_impl.h" | 5 #include "blimp/client/core/blimp_client_context_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 void BlimpClientContextImpl::ConnectWithAssignment( | 143 void BlimpClientContextImpl::ConnectWithAssignment( |
| 144 const Assignment& assignment) { | 144 const Assignment& assignment) { |
| 145 io_thread_task_runner_->PostTask( | 145 io_thread_task_runner_->PostTask( |
| 146 FROM_HERE, | 146 FROM_HERE, |
| 147 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, | 147 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, |
| 148 base::Unretained(net_components_.get()), assignment)); | 148 base::Unretained(net_components_.get()), assignment)); |
| 149 } | 149 } |
| 150 | 150 |
| 151 std::unordered_map<std::string, std::string> | 151 std::unordered_map<std::string, std::string> |
| 152 BlimpClientContextImpl::CreateFeedbackData() { | 152 BlimpClientContextImpl::CreateFeedbackData() { |
| 153 return CreateBlimpFeedbackData(); | 153 return CreateBlimpFeedbackData(blimp_contents_manager_.get()); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void BlimpClientContextImpl::OnAuthTokenReceived( | 156 void BlimpClientContextImpl::OnAuthTokenReceived( |
| 157 const std::string& client_auth_token) { | 157 const std::string& client_auth_token) { |
| 158 if (!assignment_source_) { | 158 if (!assignment_source_) { |
| 159 assignment_source_.reset(new AssignmentSource( | 159 assignment_source_.reset(new AssignmentSource( |
| 160 GetAssignerURL(), io_thread_task_runner_, file_thread_task_runner_)); | 160 GetAssignerURL(), io_thread_task_runner_, file_thread_task_runner_)); |
| 161 } | 161 } |
| 162 | 162 |
| 163 VLOG(1) << "Trying to get assignment."; | 163 VLOG(1) << "Trying to get assignment."; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 base::Unretained(this))); | 249 base::Unretained(this))); |
| 250 } | 250 } |
| 251 | 251 |
| 252 void BlimpClientContextImpl::OnImageDecodeError() { | 252 void BlimpClientContextImpl::OnImageDecodeError() { |
| 253 // Currently we just drop the connection on image decoding error. | 253 // Currently we just drop the connection on image decoding error. |
| 254 DropConnection(); | 254 DropConnection(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace client | 257 } // namespace client |
| 258 } // namespace blimp | 258 } // namespace blimp |
| OLD | NEW |