| 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" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 protected: | 64 protected: |
| 65 ~WebrtcLoggingPrivateFunctionWithUploadCallback() override {} | 65 ~WebrtcLoggingPrivateFunctionWithUploadCallback() override {} |
| 66 | 66 |
| 67 #if defined(ENABLE_WEBRTC) | 67 #if defined(ENABLE_WEBRTC) |
| 68 // Must be called on UI thread. | 68 // Must be called on UI thread. |
| 69 void FireCallback(bool success, const std::string& report_id, | 69 void FireCallback(bool success, const std::string& report_id, |
| 70 const std::string& error_message); | 70 const std::string& error_message); |
| 71 #endif | 71 #endif |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 class WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback | 74 class WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback |
| 75 : public WebrtcLoggingPrivateFunction { | 75 : public WebrtcLoggingPrivateFunction { |
| 76 protected: | 76 protected: |
| 77 ~WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback() override {} | 77 ~WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback() override {} |
| 78 | 78 |
| 79 #if defined(ENABLE_WEBRTC) | 79 #if defined(ENABLE_WEBRTC) |
| 80 // Must be called on UI thread. | 80 // Must be called on UI thread. |
| 81 void FireErrorCallback(const std::string& error_message); | 81 void FireErrorCallback(const std::string& error_message); |
| 82 void FireCallback(const std::string& prefix_path, | 82 void FireCallback(const std::string& prefix_path, |
| 83 bool did_stop, | 83 bool did_stop, |
| 84 bool did_manual_stop); | 84 bool did_manual_stop); |
| 85 #endif | 85 #endif |
| 86 }; | 86 }; |
| 87 | 87 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 WebrtcLoggingPrivateStopRtpDumpFunction() {} | 219 WebrtcLoggingPrivateStopRtpDumpFunction() {} |
| 220 | 220 |
| 221 private: | 221 private: |
| 222 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} | 222 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} |
| 223 | 223 |
| 224 // ExtensionFunction overrides. | 224 // ExtensionFunction overrides. |
| 225 bool RunAsync() override; | 225 bool RunAsync() override; |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 class WebrtcLoggingPrivateStartAudioDebugRecordingsFunction | 228 class WebrtcLoggingPrivateStartAudioDebugRecordingsFunction |
| 229 : public WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback { | 229 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
| 230 public: | 230 public: |
| 231 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startAudioDebugRecordings", | 231 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startAudioDebugRecordings", |
| 232 WEBRTCLOGGINGPRIVATE_STARTAUDIODEBUGRECORDINGS) | 232 WEBRTCLOGGINGPRIVATE_STARTAUDIODEBUGRECORDINGS) |
| 233 WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() {} | 233 WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() {} |
| 234 | 234 |
| 235 private: | 235 private: |
| 236 ~WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() override {} | 236 ~WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() override {} |
| 237 | 237 |
| 238 // ExtensionFunction overrides. | 238 // ExtensionFunction overrides. |
| 239 bool RunAsync() override; | 239 bool RunAsync() override; |
| 240 }; | 240 }; |
| 241 | 241 |
| 242 class WebrtcLoggingPrivateStopAudioDebugRecordingsFunction | 242 class WebrtcLoggingPrivateStopAudioDebugRecordingsFunction |
| 243 : public WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback { | 243 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
| 244 public: | 244 public: |
| 245 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopAudioDebugRecordings", | 245 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopAudioDebugRecordings", |
| 246 WEBRTCLOGGINGPRIVATE_STOPAUDIODEBUGRECORDINGS) | 246 WEBRTCLOGGINGPRIVATE_STOPAUDIODEBUGRECORDINGS) |
| 247 WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() {} | 247 WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() {} |
| 248 | 248 |
| 249 private: | 249 private: |
| 250 ~WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() override {} | 250 ~WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() override {} |
| 251 | 251 |
| 252 // ExtensionFunction overrides. | 252 // ExtensionFunction overrides. |
| 253 bool RunAsync() override; | 253 bool RunAsync() override; |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 class WebrtcLoggingPrivateStartRtcEventLoggingFunction |
| 257 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
| 258 public: |
| 259 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startRtcEventLogging", |
| 260 WEBRTCLOGGINGPRIVATE_STARTRTCEVENTLOGGING) |
| 261 WebrtcLoggingPrivateStartRtcEventLoggingFunction() {} |
| 262 |
| 263 private: |
| 264 ~WebrtcLoggingPrivateStartRtcEventLoggingFunction() override {} |
| 265 |
| 266 // ExtensionFunction overrides. |
| 267 bool RunAsync() override; |
| 268 }; |
| 269 |
| 270 class WebrtcLoggingPrivateStopRtcEventLoggingFunction |
| 271 : public WebrtcLoggingPrivateFunctionWithTimeLimitedRecordingCallback { |
| 272 public: |
| 273 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopRtcEventLogging", |
| 274 WEBRTCLOGGINGPRIVATE_STOPRTCEVENTLOGGING) |
| 275 WebrtcLoggingPrivateStopRtcEventLoggingFunction() {} |
| 276 |
| 277 private: |
| 278 ~WebrtcLoggingPrivateStopRtcEventLoggingFunction() override {} |
| 279 |
| 280 // ExtensionFunction overrides. |
| 281 bool RunAsync() override; |
| 282 }; |
| 283 |
| 256 } // namespace extensions | 284 } // namespace extensions |
| 257 | 285 |
| 258 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ | 286 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ |
| OLD | NEW |