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