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 "chrome/browser/extensions/chrome_extension_function.h" | 8 #include "chrome/browser/extensions/chrome_extension_function.h" |
9 #include "chrome/common/extensions/api/webrtc_logging_private.h" | 9 #include "chrome/common/extensions/api/webrtc_logging_private.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 : public WebrtcLoggingPrivateTabIdFunction { | 29 : public WebrtcLoggingPrivateTabIdFunction { |
30 public: | 30 public: |
31 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setMetaData", | 31 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setMetaData", |
32 WEBRTCLOGGINGPRIVATE_SETMETADATA) | 32 WEBRTCLOGGINGPRIVATE_SETMETADATA) |
33 WebrtcLoggingPrivateSetMetaDataFunction(); | 33 WebrtcLoggingPrivateSetMetaDataFunction(); |
34 | 34 |
35 private: | 35 private: |
36 virtual ~WebrtcLoggingPrivateSetMetaDataFunction(); | 36 virtual ~WebrtcLoggingPrivateSetMetaDataFunction(); |
37 | 37 |
38 // ExtensionFunction overrides. | 38 // ExtensionFunction overrides. |
39 virtual bool RunImpl() OVERRIDE; | 39 virtual bool RunAsync() OVERRIDE; |
40 | 40 |
41 // Must be called on UI thread. | 41 // Must be called on UI thread. |
42 void SetMetaDataCallback(bool success, const std::string& error_message); | 42 void SetMetaDataCallback(bool success, const std::string& error_message); |
43 }; | 43 }; |
44 | 44 |
45 class WebrtcLoggingPrivateStartFunction | 45 class WebrtcLoggingPrivateStartFunction |
46 : public WebrtcLoggingPrivateTabIdFunction { | 46 : public WebrtcLoggingPrivateTabIdFunction { |
47 public: | 47 public: |
48 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.start", | 48 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.start", |
49 WEBRTCLOGGINGPRIVATE_START) | 49 WEBRTCLOGGINGPRIVATE_START) |
50 WebrtcLoggingPrivateStartFunction(); | 50 WebrtcLoggingPrivateStartFunction(); |
51 | 51 |
52 private: | 52 private: |
53 virtual ~WebrtcLoggingPrivateStartFunction(); | 53 virtual ~WebrtcLoggingPrivateStartFunction(); |
54 | 54 |
55 // ExtensionFunction overrides. | 55 // ExtensionFunction overrides. |
56 virtual bool RunImpl() OVERRIDE; | 56 virtual bool RunAsync() OVERRIDE; |
57 | 57 |
58 // Must be called on UI thread. | 58 // Must be called on UI thread. |
59 void StartCallback(bool success, const std::string& error_message); | 59 void StartCallback(bool success, const std::string& error_message); |
60 }; | 60 }; |
61 | 61 |
62 class WebrtcLoggingPrivateSetUploadOnRenderCloseFunction | 62 class WebrtcLoggingPrivateSetUploadOnRenderCloseFunction |
63 : public WebrtcLoggingPrivateTabIdFunction { | 63 : public WebrtcLoggingPrivateTabIdFunction { |
64 public: | 64 public: |
65 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setUploadOnRenderClose", | 65 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.setUploadOnRenderClose", |
66 WEBRTCLOGGINGPRIVATE_SETUPLOADONRENDERCLOSE) | 66 WEBRTCLOGGINGPRIVATE_SETUPLOADONRENDERCLOSE) |
67 WebrtcLoggingPrivateSetUploadOnRenderCloseFunction(); | 67 WebrtcLoggingPrivateSetUploadOnRenderCloseFunction(); |
68 | 68 |
69 private: | 69 private: |
70 virtual ~WebrtcLoggingPrivateSetUploadOnRenderCloseFunction(); | 70 virtual ~WebrtcLoggingPrivateSetUploadOnRenderCloseFunction(); |
71 | 71 |
72 // ExtensionFunction overrides. | 72 // ExtensionFunction overrides. |
73 virtual bool RunImpl() OVERRIDE; | 73 virtual bool RunAsync() OVERRIDE; |
74 }; | 74 }; |
75 | 75 |
76 class WebrtcLoggingPrivateStopFunction | 76 class WebrtcLoggingPrivateStopFunction |
77 : public WebrtcLoggingPrivateTabIdFunction { | 77 : public WebrtcLoggingPrivateTabIdFunction { |
78 public: | 78 public: |
79 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stop", | 79 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.stop", |
80 WEBRTCLOGGINGPRIVATE_STOP) | 80 WEBRTCLOGGINGPRIVATE_STOP) |
81 WebrtcLoggingPrivateStopFunction(); | 81 WebrtcLoggingPrivateStopFunction(); |
82 | 82 |
83 private: | 83 private: |
84 virtual ~WebrtcLoggingPrivateStopFunction(); | 84 virtual ~WebrtcLoggingPrivateStopFunction(); |
85 | 85 |
86 // ExtensionFunction overrides. | 86 // ExtensionFunction overrides. |
87 virtual bool RunImpl() OVERRIDE; | 87 virtual bool RunAsync() OVERRIDE; |
88 | 88 |
89 // Must be called on UI thread. | 89 // Must be called on UI thread. |
90 void StopCallback(bool success, const std::string& error_message); | 90 void StopCallback(bool success, const std::string& error_message); |
91 }; | 91 }; |
92 | 92 |
93 class WebrtcLoggingPrivateUploadFunction | 93 class WebrtcLoggingPrivateUploadFunction |
94 : public WebrtcLoggingPrivateTabIdFunction { | 94 : public WebrtcLoggingPrivateTabIdFunction { |
95 public: | 95 public: |
96 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.upload", | 96 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.upload", |
97 WEBRTCLOGGINGPRIVATE_UPLOAD) | 97 WEBRTCLOGGINGPRIVATE_UPLOAD) |
98 WebrtcLoggingPrivateUploadFunction(); | 98 WebrtcLoggingPrivateUploadFunction(); |
99 | 99 |
100 private: | 100 private: |
101 virtual ~WebrtcLoggingPrivateUploadFunction(); | 101 virtual ~WebrtcLoggingPrivateUploadFunction(); |
102 | 102 |
103 // ExtensionFunction overrides. | 103 // ExtensionFunction overrides. |
104 virtual bool RunImpl() OVERRIDE; | 104 virtual bool RunAsync() OVERRIDE; |
105 | 105 |
106 // Must be called on UI thread. | 106 // Must be called on UI thread. |
107 void UploadCallback(bool success, const std::string& report_id, | 107 void UploadCallback(bool success, const std::string& report_id, |
108 const std::string& error_message); | 108 const std::string& error_message); |
109 }; | 109 }; |
110 | 110 |
111 class WebrtcLoggingPrivateDiscardFunction | 111 class WebrtcLoggingPrivateDiscardFunction |
112 : public WebrtcLoggingPrivateTabIdFunction { | 112 : public WebrtcLoggingPrivateTabIdFunction { |
113 public: | 113 public: |
114 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.discard", | 114 DECLARE_EXTENSION_FUNCTION("webrtcLoggingPrivate.discard", |
115 WEBRTCLOGGINGPRIVATE_DISCARD) | 115 WEBRTCLOGGINGPRIVATE_DISCARD) |
116 WebrtcLoggingPrivateDiscardFunction(); | 116 WebrtcLoggingPrivateDiscardFunction(); |
117 | 117 |
118 private: | 118 private: |
119 virtual ~WebrtcLoggingPrivateDiscardFunction(); | 119 virtual ~WebrtcLoggingPrivateDiscardFunction(); |
120 | 120 |
121 // ExtensionFunction overrides. | 121 // ExtensionFunction overrides. |
122 virtual bool RunImpl() OVERRIDE; | 122 virtual bool RunAsync() OVERRIDE; |
123 | 123 |
124 // Must be called on UI thread. | 124 // Must be called on UI thread. |
125 void DiscardCallback(bool success, const std::string& error_message); | 125 void DiscardCallback(bool success, const std::string& error_message); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace extensions | 128 } // namespace extensions |
129 | 129 |
130 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ | 130 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_LOGGING_PRIVATE_WEBRTC_LOGGING_P
RIVATE_API_H_ |
OLD | NEW |