| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
| 6 | 6 |
| 7 #include <nacl_io/nacl_io.h> | 7 #include <nacl_io/nacl_io.h> |
| 8 #include <sys/mount.h> | 8 #include <sys/mount.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 void ChromotingInstance::HandleOnIncomingIq(const base::DictionaryValue& data) { | 725 void ChromotingInstance::HandleOnIncomingIq(const base::DictionaryValue& data) { |
| 726 std::string iq; | 726 std::string iq; |
| 727 if (!data.GetString("iq", &iq)) { | 727 if (!data.GetString("iq", &iq)) { |
| 728 LOG(ERROR) << "Invalid incomingIq() data."; | 728 LOG(ERROR) << "Invalid incomingIq() data."; |
| 729 return; | 729 return; |
| 730 } | 730 } |
| 731 | 731 |
| 732 // Just ignore the message if it's received before Connect() is called. It's | 732 // Just ignore the message if it's received before Connect() is called. It's |
| 733 // likely to be a leftover from a previous session, so it's safe to ignore it. | 733 // likely to be a leftover from a previous session, so it's safe to ignore it. |
| 734 if (signal_strategy_) | 734 if (signal_strategy_) |
| 735 signal_strategy_->OnIncomingMessage(iq); | 735 signal_strategy_->GetIncomingMessageCallback().Run(iq); |
| 736 } | 736 } |
| 737 | 737 |
| 738 void ChromotingInstance::HandleReleaseAllKeys( | 738 void ChromotingInstance::HandleReleaseAllKeys( |
| 739 const base::DictionaryValue& data) { | 739 const base::DictionaryValue& data) { |
| 740 if (IsConnected()) | 740 if (IsConnected()) |
| 741 input_tracker_.ReleaseAll(); | 741 input_tracker_.ReleaseAll(); |
| 742 } | 742 } |
| 743 | 743 |
| 744 void ChromotingInstance::HandleInjectKeyEvent( | 744 void ChromotingInstance::HandleInjectKeyEvent( |
| 745 const base::DictionaryValue& data) { | 745 const base::DictionaryValue& data) { |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 if (is_custom_counts_histogram) { | 1131 if (is_custom_counts_histogram) { |
| 1132 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1132 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
| 1133 histogram_max, histogram_buckets); | 1133 histogram_max, histogram_buckets); |
| 1134 } else { | 1134 } else { |
| 1135 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1135 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
| 1136 histogram_max, histogram_buckets); | 1136 histogram_max, histogram_buckets); |
| 1137 } | 1137 } |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 } // namespace remoting | 1140 } // namespace remoting |
| OLD | NEW |