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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 const webrtc::DesktopRegion& dirty_region) { | 349 const webrtc::DesktopRegion& dirty_region) { |
350 std::unique_ptr<base::ListValue> rects_value(new base::ListValue()); | 350 std::unique_ptr<base::ListValue> rects_value(new base::ListValue()); |
351 for (webrtc::DesktopRegion::Iterator i(dirty_region); !i.IsAtEnd(); | 351 for (webrtc::DesktopRegion::Iterator i(dirty_region); !i.IsAtEnd(); |
352 i.Advance()) { | 352 i.Advance()) { |
353 const webrtc::DesktopRect& rect = i.rect(); | 353 const webrtc::DesktopRect& rect = i.rect(); |
354 std::unique_ptr<base::ListValue> rect_value(new base::ListValue()); | 354 std::unique_ptr<base::ListValue> rect_value(new base::ListValue()); |
355 rect_value->AppendInteger(rect.left()); | 355 rect_value->AppendInteger(rect.left()); |
356 rect_value->AppendInteger(rect.top()); | 356 rect_value->AppendInteger(rect.top()); |
357 rect_value->AppendInteger(rect.width()); | 357 rect_value->AppendInteger(rect.width()); |
358 rect_value->AppendInteger(rect.height()); | 358 rect_value->AppendInteger(rect.height()); |
359 rects_value->Append(rect_value.release()); | 359 rects_value->Append(std::move(rect_value)); |
360 } | 360 } |
361 | 361 |
362 std::unique_ptr<base::DictionaryValue> data(new base::DictionaryValue()); | 362 std::unique_ptr<base::DictionaryValue> data(new base::DictionaryValue()); |
363 data->Set("rects", rects_value.release()); | 363 data->Set("rects", rects_value.release()); |
364 PostLegacyJsonMessage("onDebugRegion", std::move(data)); | 364 PostLegacyJsonMessage("onDebugRegion", std::move(data)); |
365 } | 365 } |
366 | 366 |
367 void ChromotingInstance::OnConnectionState( | 367 void ChromotingInstance::OnConnectionState( |
368 protocol::ConnectionToHost::State state, | 368 protocol::ConnectionToHost::State state, |
369 protocol::ErrorCode error) { | 369 protocol::ErrorCode error) { |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 if (is_custom_counts_histogram) { | 1126 if (is_custom_counts_histogram) { |
1127 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1127 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
1128 histogram_max, histogram_buckets); | 1128 histogram_max, histogram_buckets); |
1129 } else { | 1129 } else { |
1130 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1130 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
1131 histogram_max, histogram_buckets); | 1131 histogram_max, histogram_buckets); |
1132 } | 1132 } |
1133 } | 1133 } |
1134 | 1134 |
1135 } // namespace remoting | 1135 } // namespace remoting |
OLD | NEW |