OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_PRIV
ATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_PRIV
ATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_PRIV
ATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_PRIV
ATE_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
11 #if defined(ENABLE_WEBRTC) | 11 #if defined(ENABLE_WEBRTC) |
| 12 #include "chrome/browser/media/webrtc_internal_log_handler_host.h" |
12 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 13 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
13 #endif | 14 #endif |
14 #include "chrome/common/extensions/api/webrtc_logging_private.h" | 15 #include "chrome/common/extensions/api/webrtc_logging_private.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 class RenderProcessHost; | 19 class RenderProcessHost; |
19 | 20 |
20 } | 21 } |
21 | 22 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 protected: | 65 protected: |
65 ~WebrtcLoggingPrivateFunctionWithUploadCallback() override {} | 66 ~WebrtcLoggingPrivateFunctionWithUploadCallback() override {} |
66 | 67 |
67 #if defined(ENABLE_WEBRTC) | 68 #if defined(ENABLE_WEBRTC) |
68 // Must be called on UI thread. | 69 // Must be called on UI thread. |
69 void FireCallback(bool success, const std::string& report_id, | 70 void FireCallback(bool success, const std::string& report_id, |
70 const std::string& error_message); | 71 const std::string& error_message); |
71 #endif | 72 #endif |
72 }; | 73 }; |
73 | 74 |
74 class WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback | 75 class WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback |
75 : public WebrtcLoggingPrivateFunction { | 76 : public WebrtcLoggingPrivateFunction { |
76 protected: | 77 protected: |
77 ~WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback() override {} | 78 ~WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback() override {} |
78 | 79 |
79 #if defined(ENABLE_WEBRTC) | 80 #if defined(ENABLE_WEBRTC) |
80 // Must be called on UI thread. | 81 // Must be called on UI thread. |
81 void FireErrorCallback(const std::string& error_message); | 82 void FireErrorCallback(const std::string& error_message); |
82 void FireCallback(const std::string& prefix_path, | 83 void FireCallback(const std::string& prefix_path, |
83 bool did_stop, | 84 bool did_stop, |
84 bool did_manual_stop); | 85 bool did_manual_stop); |
85 #endif | 86 #endif |
86 }; | 87 }; |
87 | 88 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 WebrtcLoggingPrivateStopRtpDumpFunction() {} | 220 WebrtcLoggingPrivateStopRtpDumpFunction() {} |
220 | 221 |
221 private: | 222 private: |
222 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} | 223 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} |
223 | 224 |
224 // ExtensionFunction overrides. | 225 // ExtensionFunction overrides. |
225 bool RunAsync() override; | 226 bool RunAsync() override; |
226 }; | 227 }; |
227 | 228 |
228 class WebrtcLoggingPrivateStartAudioDebugRecordingsFunction | 229 class WebrtcLoggingPrivateStartAudioDebugRecordingsFunction |
229 : public WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback { | 230 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
230 public: | 231 public: |
231 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startAudioDebugRecordings", | 232 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startAudioDebugRecordings", |
232 WEBRTCLOGGINGPRIVATE_STARTAUDIODEBUGRECORDINGS) | 233 WEBRTCLOGGINGPRIVATE_STARTAUDIODEBUGRECORDINGS) |
233 WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() {} | 234 WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() {} |
234 | 235 |
235 private: | 236 private: |
236 ~WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() override {} | 237 ~WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() override {} |
237 | 238 |
238 // ExtensionFunction overrides. | 239 // ExtensionFunction overrides. |
239 bool RunAsync() override; | 240 bool RunAsync() override; |
240 }; | 241 }; |
241 | 242 |
242 class WebrtcLoggingPrivateStopAudioDebugRecordingsFunction | 243 class WebrtcLoggingPrivateStopAudioDebugRecordingsFunction |
243 : public WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback { | 244 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
244 public: | 245 public: |
245 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopAudioDebugRecordings", | 246 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopAudioDebugRecordings", |
246 WEBRTCLOGGINGPRIVATE_STOPAUDIODEBUGRECORDINGS) | 247 WEBRTCLOGGINGPRIVATE_STOPAUDIODEBUGRECORDINGS) |
247 WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() {} | 248 WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() {} |
248 | 249 |
249 private: | 250 private: |
250 ~WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() override {} | 251 ~WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() override {} |
251 | 252 |
252 // ExtensionFunction overrides. | 253 // ExtensionFunction overrides. |
253 bool RunAsync() override; | 254 bool RunAsync() override; |
254 }; | 255 }; |
255 | 256 |
| 257 class WebrtcLoggingPrivateStartRtcEventLoggingFunction |
| 258 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
| 259 public: |
| 260 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startRtcEventLogging", |
| 261 WEBRTCLOGGINGPRIVATE_STARTRTCEVENTLOGGING) |
| 262 WebrtcLoggingPrivateStartRtcEventLoggingFunction() {} |
| 263 |
| 264 private: |
| 265 ~WebrtcLoggingPrivateStartRtcEventLoggingFunction() override {} |
| 266 |
| 267 // ExtensionFunction overrides. |
| 268 bool RunAsync() override; |
| 269 }; |
| 270 |
| 271 class WebrtcLoggingPrivateStopRtcEventLoggingFunction |
| 272 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
| 273 public: |
| 274 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopRtcEventLogging", |
| 275 WEBRTCLOGGINGPRIVATE_STOPRTCEVENTLOGGING) |
| 276 WebrtcLoggingPrivateStopRtcEventLoggingFunction() {} |
| 277 |
| 278 private: |
| 279 ~WebrtcLoggingPrivateStopRtcEventLoggingFunction() override {} |
| 280 |
| 281 // ExtensionFunction overrides. |
| 282 bool RunAsync() override; |
| 283 }; |
| 284 |
256 } // namespace extensions | 285 } // namespace extensions |
257 | 286 |
258 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ | 287 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ |
OLD | NEW |