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