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/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 base::ListValue* format_list = new base::ListValue(); | 239 base::ListValue* format_list = new base::ListValue(); |
240 for (const auto& format : video_capture_device_info.supported_formats) | 240 for (const auto& format : video_capture_device_info.supported_formats) |
241 format_list->AppendString(format.ToString()); | 241 format_list->AppendString(format.ToString()); |
242 | 242 |
243 base::DictionaryValue* device_dict = new base::DictionaryValue(); | 243 base::DictionaryValue* device_dict = new base::DictionaryValue(); |
244 device_dict->SetString("id", video_capture_device_info.name.id()); | 244 device_dict->SetString("id", video_capture_device_info.name.id()); |
245 device_dict->SetString( | 245 device_dict->SetString( |
246 "name", video_capture_device_info.name.GetNameAndModel()); | 246 "name", video_capture_device_info.name.GetNameAndModel()); |
247 device_dict->Set("formats", format_list); | 247 device_dict->Set("formats", format_list); |
248 #if defined(OS_WIN) || defined(OS_MACOSX) | 248 #if defined(OS_WIN) || defined(OS_MACOSX) |
249 device_dict->SetInteger( | 249 device_dict->SetString( |
250 "captureApi", | 250 "captureApi", |
251 video_capture_device_info.name.capture_api_type()); | 251 video_capture_device_info.name.GetCaptureApiTypeString()); |
252 #endif | 252 #endif |
253 video_capture_capabilities_cached_data_.Append(device_dict); | 253 video_capture_capabilities_cached_data_.Append(device_dict); |
254 } | 254 } |
255 | 255 |
256 if (update_callbacks_.size() > 0) | 256 if (update_callbacks_.size() > 0) |
257 SendVideoCaptureDeviceCapabilities(); | 257 SendVideoCaptureDeviceCapabilities(); |
258 } | 258 } |
259 | 259 |
260 scoped_ptr<media::AudioLog> MediaInternals::CreateAudioLog( | 260 scoped_ptr<media::AudioLog> MediaInternals::CreateAudioLog( |
261 AudioComponent component) { | 261 AudioComponent component) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 const std::string& function, | 300 const std::string& function, |
301 const base::DictionaryValue* value) { | 301 const base::DictionaryValue* value) { |
302 SendUpdate(SerializeUpdate(function, value)); | 302 SendUpdate(SerializeUpdate(function, value)); |
303 | 303 |
304 base::AutoLock auto_lock(lock_); | 304 base::AutoLock auto_lock(lock_); |
305 scoped_ptr<base::Value> out_value; | 305 scoped_ptr<base::Value> out_value; |
306 CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value)); | 306 CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value)); |
307 } | 307 } |
308 | 308 |
309 } // namespace content | 309 } // namespace content |
OLD | NEW |