Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/it2me/it2me_native_messaging_host.h" | 5 #include "remoting/host/it2me/it2me_native_messaging_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 | 274 |
| 275 case kError: | 275 case kError: |
| 276 // kError is an internal-only state, sent to the web-app by a separate | 276 // kError is an internal-only state, sent to the web-app by a separate |
| 277 // "error" message so that errors that occur before the "connect" message | 277 // "error" message so that errors that occur before the "connect" message |
| 278 // is sent can be communicated. | 278 // is sent can be communicated. |
| 279 message->SetString("type", "error"); | 279 message->SetString("type", "error"); |
| 280 message->SetString("description", error_message); | 280 message->SetString("description", error_message); |
| 281 break; | 281 break; |
| 282 | 282 |
| 283 default: | 283 default: |
| 284 ; | 284 break; |
|
Evan Stade
2015/12/30 18:49:11
ha ha
| |
| 285 } | 285 } |
| 286 | 286 |
| 287 SendMessageToClient(std::move(message)); | 287 SendMessageToClient(std::move(message)); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void It2MeNativeMessagingHost::OnNatPolicyChanged(bool nat_traversal_enabled) { | 290 void It2MeNativeMessagingHost::OnNatPolicyChanged(bool nat_traversal_enabled) { |
| 291 DCHECK(task_runner()->BelongsToCurrentThread()); | 291 DCHECK(task_runner()->BelongsToCurrentThread()); |
| 292 | 292 |
| 293 scoped_ptr<base::DictionaryValue> message(new base::DictionaryValue()); | 293 scoped_ptr<base::DictionaryValue> message(new base::DictionaryValue()); |
| 294 | 294 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 320 return host_context_->ui_task_runner(); | 320 return host_context_->ui_task_runner(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 /* static */ | 323 /* static */ |
| 324 std::string It2MeNativeMessagingHost::HostStateToString( | 324 std::string It2MeNativeMessagingHost::HostStateToString( |
| 325 It2MeHostState host_state) { | 325 It2MeHostState host_state) { |
| 326 return ValueToName(kIt2MeHostStates, host_state); | 326 return ValueToName(kIt2MeHostStates, host_state); |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace remoting | 329 } // namespace remoting |
| OLD | NEW |