| 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 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 6 #define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <tuple> | 11 #include <tuple> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/lazy_instance.h" | 16 #include "base/lazy_instance.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
| 19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
| 20 #include "base/values.h" | 20 #include "base/values.h" |
| 21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
| 22 #include "content/public/browser/notification_observer.h" | 22 #include "content/public/browser/notification_observer.h" |
| 23 #include "content/public/browser/notification_registrar.h" | 23 #include "content/public/browser/notification_registrar.h" |
| 24 #include "device/capture/video/video_capture_device_descriptor.h" |
| 24 #include "media/audio/audio_logging.h" | 25 #include "media/audio/audio_logging.h" |
| 25 #include "media/base/media_log.h" | 26 #include "media/base/media_log.h" |
| 26 #include "media/base/video_capture_types.h" | 27 #include "media/base/video_capture_types.h" |
| 27 #include "media/capture/video/video_capture_device_descriptor.h" | |
| 28 | 28 |
| 29 namespace media { | 29 namespace media { |
| 30 class AudioParameters; | 30 class AudioParameters; |
| 31 struct MediaLogEvent; | 31 struct MediaLogEvent; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 | 35 |
| 36 // This class stores information about currently active media. | 36 // This class stores information about currently active media. |
| 37 class CONTENT_EXPORT MediaInternals | 37 class CONTENT_EXPORT MediaInternals |
| (...skipping 30 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 // Sends all audio cached data to each registered UpdateCallback. | 69 // Sends all audio cached data to each registered UpdateCallback. |
| 70 void SendAudioStreamData(); | 70 void SendAudioStreamData(); |
| 71 | 71 |
| 72 // Sends all video capture capabilities cached data to each registered | 72 // Sends all video capture capabilities cached data to each registered |
| 73 // UpdateCallback. | 73 // UpdateCallback. |
| 74 void SendVideoCaptureDeviceCapabilities(); | 74 void SendVideoCaptureDeviceCapabilities(); |
| 75 | 75 |
| 76 // Called to inform of the capabilities enumerated for video devices. | 76 // Called to inform of the capabilities enumerated for video devices. |
| 77 void UpdateVideoCaptureDeviceCapabilities( | 77 void UpdateVideoCaptureDeviceCapabilities( |
| 78 const std::vector<std::tuple<media::VideoCaptureDeviceDescriptor, | 78 const std::vector<std::tuple<device::VideoCaptureDeviceDescriptor, |
| 79 media::VideoCaptureFormats>>& | 79 media::VideoCaptureFormats>>& |
| 80 descriptors_and_formats); | 80 descriptors_and_formats); |
| 81 | 81 |
| 82 // AudioLogFactory implementation. Safe to call from any thread. | 82 // AudioLogFactory implementation. Safe to call from any thread. |
| 83 std::unique_ptr<media::AudioLog> CreateAudioLog( | 83 std::unique_ptr<media::AudioLog> CreateAudioLog( |
| 84 AudioComponent component) override; | 84 AudioComponent component) override; |
| 85 | 85 |
| 86 // If possible, i.e. a WebContents exists for the given RenderFrameHostID, | 86 // If possible, i.e. a WebContents exists for the given RenderFrameHostID, |
| 87 // tells an existing AudioLogEntry the WebContents title for easier | 87 // tells an existing AudioLogEntry the WebContents title for easier |
| 88 // differentiation on the UI. | 88 // differentiation on the UI. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 base::DictionaryValue audio_streams_cached_data_; | 143 base::DictionaryValue audio_streams_cached_data_; |
| 144 int owner_ids_[AUDIO_COMPONENT_MAX]; | 144 int owner_ids_[AUDIO_COMPONENT_MAX]; |
| 145 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; | 145 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; |
| 146 | 146 |
| 147 DISALLOW_COPY_AND_ASSIGN(MediaInternals); | 147 DISALLOW_COPY_AND_ASSIGN(MediaInternals); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace content | 150 } // namespace content |
| 151 | 151 |
| 152 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 152 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| OLD | NEW |