Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h

Issue 1530863002: Allow audio debug recordings through a private API extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 WebrtcLoggingPrivateFunctionWithAecDumpStartedCallback
75 : public WebrtcLoggingPrivateFunction {
76 protected:
77 ~WebrtcLoggingPrivateFunctionWithAecDumpStartedCallback() override {}
78
79 #if defined(ENABLE_WEBRTC)
80 // Must be called on UI thread.
81 void FireCallback(bool success,
82 const std::string& prefix_path,
83 const std::string& error_message);
84 #endif
85 };
86
72 class WebrtcLoggingPrivateSetMetaDataFunction 87 class WebrtcLoggingPrivateSetMetaDataFunction
73 : public WebrtcLoggingPrivateFunctionWithGenericCallback { 88 : public WebrtcLoggingPrivateFunctionWithGenericCallback {
74 public: 89 public:
75 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setMetaData", 90 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setMetaData",
76 WEBRTCLOGGINGPRIVATE_SETMETADATA) 91 WEBRTCLOGGINGPRIVATE_SETMETADATA)
77 WebrtcLoggingPrivateSetMetaDataFunction() {} 92 WebrtcLoggingPrivateSetMetaDataFunction() {}
78 93
79 private: 94 private:
80 ~WebrtcLoggingPrivateSetMetaDataFunction() override {} 95 ~WebrtcLoggingPrivateSetMetaDataFunction() override {}
81 96
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 WEBRTCLOGGINGPRIVATE_STOPRTPDUMP) 217 WEBRTCLOGGINGPRIVATE_STOPRTPDUMP)
203 WebrtcLoggingPrivateStopRtpDumpFunction() {} 218 WebrtcLoggingPrivateStopRtpDumpFunction() {}
204 219
205 private: 220 private:
206 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {} 221 ~WebrtcLoggingPrivateStopRtpDumpFunction() override {}
207 222
208 // ExtensionFunction overrides. 223 // ExtensionFunction overrides.
209 bool RunAsync() override; 224 bool RunAsync() override;
210 }; 225 };
211 226
227 class WebrtcLoggingPrivateStartAecDumpFunction
228 : public WebrtcLoggingPrivateFunctionWithAecDumpStartedCallback {
229 public:
230 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.startAecDump",
231 WEBRTCLOGGINGPRIVATE_STARTAECDUMP)
232 WebrtcLoggingPrivateStartAecDumpFunction() {}
233
234 private:
235 ~WebrtcLoggingPrivateStartAecDumpFunction() override {}
236
237 // ExtensionFunction overrides.
238 bool RunAsync() override;
239 };
240
241 class WebrtcLoggingPrivateStopAecDumpFunction
242 : public WebrtcLoggingPrivateFunctionWithGenericCallback {
243 public:
244 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stopAecDump",
245 WEBRTCLOGGINGPRIVATE_STOPAECDUMP)
246 WebrtcLoggingPrivateStopAecDumpFunction() {}
247
248 private:
249 ~WebrtcLoggingPrivateStopAecDumpFunction() override {}
250
251 // ExtensionFunction overrides.
252 bool RunAsync() override;
253 };
254
212 } // namespace extensions 255 } // namespace extensions
213 256
214 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P RIVATE_API_H_ 257 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P RIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698