OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_WEBRTC_INTERNALS_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ |
6 #define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ | 6 #define CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const std::string& audio_constraints, | 78 const std::string& audio_constraints, |
79 const std::string& video_constraints); | 79 const std::string& video_constraints); |
80 | 80 |
81 // Methods for adding or removing WebRTCInternalsUIObserver. | 81 // Methods for adding or removing WebRTCInternalsUIObserver. |
82 void AddObserver(WebRTCInternalsUIObserver *observer); | 82 void AddObserver(WebRTCInternalsUIObserver *observer); |
83 void RemoveObserver(WebRTCInternalsUIObserver *observer); | 83 void RemoveObserver(WebRTCInternalsUIObserver *observer); |
84 | 84 |
85 // Sends all update data to |observer|. | 85 // Sends all update data to |observer|. |
86 void UpdateObserver(WebRTCInternalsUIObserver* observer); | 86 void UpdateObserver(WebRTCInternalsUIObserver* observer); |
87 | 87 |
88 // Tells the renderer processes to start or stop recording RTP packets. | |
89 void StartRtpRecording(); | |
90 void StopRtpRecording(); | |
91 | |
92 // Enables or disables AEC dump (diagnostic echo canceller recording). | 88 // Enables or disables AEC dump (diagnostic echo canceller recording). |
93 void EnableAecDump(content::WebContents* web_contents); | 89 void EnableAecDump(content::WebContents* web_contents); |
94 void DisableAecDump(); | 90 void DisableAecDump(); |
95 | 91 |
96 bool aec_dump_enabled() { | 92 bool aec_dump_enabled() { |
97 return aec_dump_enabled_; | 93 return aec_dump_enabled_; |
98 } | 94 } |
99 | 95 |
100 base::FilePath aec_dump_file_path() { | 96 base::FilePath aec_dump_file_path() { |
101 return aec_dump_file_path_; | 97 return aec_dump_file_path_; |
(...skipping 22 matching lines...) Expand all Loading... |
124 const NotificationDetails& details) OVERRIDE; | 120 const NotificationDetails& details) OVERRIDE; |
125 | 121 |
126 // ui::SelectFileDialog::Listener implementation. | 122 // ui::SelectFileDialog::Listener implementation. |
127 virtual void FileSelected(const base::FilePath& path, | 123 virtual void FileSelected(const base::FilePath& path, |
128 int index, | 124 int index, |
129 void* unused_params) OVERRIDE; | 125 void* unused_params) OVERRIDE; |
130 | 126 |
131 // Called when a renderer exits (including crashes). | 127 // Called when a renderer exits (including crashes). |
132 void OnRendererExit(int render_process_id); | 128 void OnRendererExit(int render_process_id); |
133 | 129 |
134 void SendRtpRecordingUpdate(); | |
135 | |
136 ObserverList<WebRTCInternalsUIObserver> observers_; | 130 ObserverList<WebRTCInternalsUIObserver> observers_; |
137 | 131 |
138 // |peer_connection_data_| is a list containing all the PeerConnection | 132 // |peer_connection_data_| is a list containing all the PeerConnection |
139 // updates. | 133 // updates. |
140 // Each item of the list represents the data for one PeerConnection, which | 134 // Each item of the list represents the data for one PeerConnection, which |
141 // contains these fields: | 135 // contains these fields: |
142 // "rid" -- the renderer id. | 136 // "rid" -- the renderer id. |
143 // "pid" -- OS process id of the renderer that creates the PeerConnection. | 137 // "pid" -- OS process id of the renderer that creates the PeerConnection. |
144 // "lid" -- local Id assigned to the PeerConnection. | 138 // "lid" -- local Id assigned to the PeerConnection. |
145 // "url" -- url of the web page that created the PeerConnection. | 139 // "url" -- url of the web page that created the PeerConnection. |
146 // "servers" and "constraints" -- server configuration and media constraints | 140 // "servers" and "constraints" -- server configuration and media constraints |
147 // used to initialize the PeerConnection respectively. | 141 // used to initialize the PeerConnection respectively. |
148 // "log" -- a ListValue contains all the updates for the PeerConnection. Each | 142 // "log" -- a ListValue contains all the updates for the PeerConnection. Each |
149 // list item is a DictionaryValue containing "type" and "value", both of which | 143 // list item is a DictionaryValue containing "type" and "value", both of which |
150 // are strings. | 144 // are strings. |
151 base::ListValue peer_connection_data_; | 145 base::ListValue peer_connection_data_; |
152 | 146 |
153 // A list of getUserMedia requests. Each item is a DictionaryValue that | 147 // A list of getUserMedia requests. Each item is a DictionaryValue that |
154 // contains these fields: | 148 // contains these fields: |
155 // "rid" -- the renderer id. | 149 // "rid" -- the renderer id. |
156 // "pid" -- proceddId of the renderer. | 150 // "pid" -- proceddId of the renderer. |
157 // "origin" -- the security origin of the request. | 151 // "origin" -- the security origin of the request. |
158 // "audio" -- the serialized audio constraints if audio is requested. | 152 // "audio" -- the serialized audio constraints if audio is requested. |
159 // "video" -- the serialized video constraints if video is requested. | 153 // "video" -- the serialized video constraints if video is requested. |
160 base::ListValue get_user_media_requests_; | 154 base::ListValue get_user_media_requests_; |
161 | 155 |
162 NotificationRegistrar registrar_; | 156 NotificationRegistrar registrar_; |
163 | 157 |
164 bool is_recording_rtp_; | |
165 | |
166 // For managing select file dialog. | 158 // For managing select file dialog. |
167 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; | 159 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
168 | 160 |
169 // AEC dump (diagnostic echo canceller recording) state. | 161 // AEC dump (diagnostic echo canceller recording) state. |
170 bool aec_dump_enabled_; | 162 bool aec_dump_enabled_; |
171 base::FilePath aec_dump_file_path_; | 163 base::FilePath aec_dump_file_path_; |
172 }; | 164 }; |
173 | 165 |
174 } // namespace content | 166 } // namespace content |
175 | 167 |
176 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ | 168 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_INTERNALS_H_ |
OLD | NEW |