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> |
| 9 |
8 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
9 #if defined(ENABLE_WEBRTC) | 11 #if defined(ENABLE_WEBRTC) |
10 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 12 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
11 #endif | 13 #endif |
12 #include "chrome/common/extensions/api/webrtc_logging_private.h" | 14 #include "chrome/common/extensions/api/webrtc_logging_private.h" |
13 | 15 |
14 namespace content { | 16 namespace content { |
15 | 17 |
16 class RenderProcessHost; | 18 class RenderProcessHost; |
17 | 19 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 protected: | 64 protected: |
63 ~WebrtcLoggingPrivateFunctionWithUploadCallback() override {} | 65 ~WebrtcLoggingPrivateFunctionWithUploadCallback() override {} |
64 | 66 |
65 #if defined(ENABLE_WEBRTC) | 67 #if defined(ENABLE_WEBRTC) |
66 // Must be called on UI thread. | 68 // Must be called on UI thread. |
67 void FireCallback(bool success, const std::string& report_id, | 69 void FireCallback(bool success, const std::string& report_id, |
68 const std::string& error_message); | 70 const std::string& error_message); |
69 #endif | 71 #endif |
70 }; | 72 }; |
71 | 73 |
| 74 class WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback |
| 75 : public WebrtcLoggingPrivateFunction { |
| 76 protected: |
| 77 ~WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback() override {} |
| 78 |
| 79 #if defined(ENABLE_WEBRTC) |
| 80 // Must be called on UI thread. |
| 81 void FireErrorCallback(const std::string& error_message); |
| 82 void FireCallback(const std::string& prefix_path, |
| 83 bool did_stop, |
| 84 bool did_manual_stop); |
| 85 #endif |
| 86 }; |
| 87 |
72 class WebrtcLoggingPrivateSetMetaDataFunction | 88 class WebrtcLoggingPrivateSetMetaDataFunction |
73 : public WebrtcLoggingPrivateFunctionWithGenericCallback { | 89 : public WebrtcLoggingPrivateFunctionWithGenericCallback { |
74 public: | 90 public: |
75 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setMetaData", | 91 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setMetaData", |
76 WEBRTCLOGGINGPRIVATE_SETMETADATA) | 92 WEBRTCLOGGINGPRIVATE_SETMETADATA) |
77 WebrtcLoggingPrivateSetMetaDataFunction() {} | 93 WebrtcLoggingPrivateSetMetaDataFunction() {} |
78 | 94 |
79 private: | 95 private: |
80 ~WebrtcLoggingPrivateSetMetaDataFunction() override {} | 96 ~WebrtcLoggingPrivateSetMetaDataFunction() override {} |
81 | 97 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 WEBRTCLOGGINGPRIVATE_STOPRTPDUMP) | 218 WEBRTCLOGGINGPRIVATE_STOPRTPDUMP) |
203 WebrtcLoggingPrivateStopRtpDumpFunction() {} | 219 WebrtcLoggingPrivateStopRtpDumpFunction() {} |
204 | 220 |
205 private: | 221 private: |
206 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} | 222 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} |
207 | 223 |
208 // ExtensionFunction overrides. | 224 // ExtensionFunction overrides. |
209 bool RunAsync() override; | 225 bool RunAsync() override; |
210 }; | 226 }; |
211 | 227 |
| 228 class WebrtcLoggingPrivateStartAudioDebugRecordingsFunction |
| 229 : public WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback { |
| 230 public: |
| 231 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startAudioDebugRecordings", |
| 232 WEBRTCLOGGINGPRIVATE_STARTAUDIODEBUGRECORDINGS) |
| 233 WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() {} |
| 234 |
| 235 private: |
| 236 ~WebrtcLoggingPrivateStartAudioDebugRecordingsFunction() override {} |
| 237 |
| 238 // ExtensionFunction overrides. |
| 239 bool RunAsync() override; |
| 240 }; |
| 241 |
| 242 class WebrtcLoggingPrivateStopAudioDebugRecordingsFunction |
| 243 : public WebrtcLoggingPrivateFunctionWithAudioDebugRecordingsCallback { |
| 244 public: |
| 245 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopAudioDebugRecordings", |
| 246 WEBRTCLOGGINGPRIVATE_STOPAUDIODEBUGRECORDINGS) |
| 247 WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() {} |
| 248 |
| 249 private: |
| 250 ~WebrtcLoggingPrivateStopAudioDebugRecordingsFunction() override {} |
| 251 |
| 252 // ExtensionFunction overrides. |
| 253 bool RunAsync() override; |
| 254 }; |
| 255 |
212 } // namespace extensions | 256 } // namespace extensions |
213 | 257 |
214 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ | 258 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ |
OLD | NEW |