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 "content/browser/media/media_internals.h" | 5 #include "content/browser/media/media_internals.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 for (const auto& video_capture_device_info : video_capture_device_infos) { | 480 for (const auto& video_capture_device_info : video_capture_device_infos) { |
481 base::ListValue* format_list = new base::ListValue(); | 481 base::ListValue* format_list = new base::ListValue(); |
482 for (const auto& format : video_capture_device_info.supported_formats) | 482 for (const auto& format : video_capture_device_info.supported_formats) |
483 format_list->AppendString(format.ToString()); | 483 format_list->AppendString(format.ToString()); |
484 | 484 |
485 base::DictionaryValue* device_dict = new base::DictionaryValue(); | 485 base::DictionaryValue* device_dict = new base::DictionaryValue(); |
486 device_dict->SetString("id", video_capture_device_info.name.id()); | 486 device_dict->SetString("id", video_capture_device_info.name.id()); |
487 device_dict->SetString( | 487 device_dict->SetString( |
488 "name", video_capture_device_info.name.GetNameAndModel()); | 488 "name", video_capture_device_info.name.GetNameAndModel()); |
489 device_dict->Set("formats", format_list); | 489 device_dict->Set("formats", format_list); |
490 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | 490 #if defined(OS_WIN) || defined(OS_MACOSX) |
491 device_dict->SetString( | 491 device_dict->SetString( |
492 "captureApi", | 492 "captureApi", |
493 video_capture_device_info.name.GetCaptureApiTypeString()); | 493 video_capture_device_info.name.GetCaptureApiTypeString()); |
494 #endif | 494 #endif |
495 video_capture_capabilities_cached_data_.Append(device_dict); | 495 video_capture_capabilities_cached_data_.Append(device_dict); |
496 } | 496 } |
497 | 497 |
498 if (update_callbacks_.size() > 0) | 498 if (update_callbacks_.size() > 0) |
499 SendVideoCaptureDeviceCapabilities(); | 499 SendVideoCaptureDeviceCapabilities(); |
500 } | 500 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 const std::string& function, | 542 const std::string& function, |
543 const base::DictionaryValue* value) { | 543 const base::DictionaryValue* value) { |
544 SendUpdate(SerializeUpdate(function, value)); | 544 SendUpdate(SerializeUpdate(function, value)); |
545 | 545 |
546 base::AutoLock auto_lock(lock_); | 546 base::AutoLock auto_lock(lock_); |
547 scoped_ptr<base::Value> out_value; | 547 scoped_ptr<base::Value> out_value; |
548 CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value)); | 548 CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value)); |
549 } | 549 } |
550 | 550 |
551 } // namespace content | 551 } // namespace content |
OLD | NEW |