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

Side by Side Diff: extensions/browser/api/cast_channel/cast_channel_api.h

Issue 2688463003: [chrome.cast.channel] Remove event logging. (Closed)
Patch Set: Remove errors object when socket is closed Created 3 years, 10 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_
6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 }; 234 };
235 235
236 class CastChannelCloseFunction : public CastChannelAsyncApiFunction { 236 class CastChannelCloseFunction : public CastChannelAsyncApiFunction {
237 public: 237 public:
238 CastChannelCloseFunction(); 238 CastChannelCloseFunction();
239 239
240 protected: 240 protected:
241 ~CastChannelCloseFunction() override; 241 ~CastChannelCloseFunction() override;
242 242
243 // AsyncApiFunction: 243 // AsyncApiFunction:
244 bool PrePrepare() override;
244 bool Prepare() override; 245 bool Prepare() override;
245 void AsyncWorkStart() override; 246 void AsyncWorkStart() override;
246 247
247 private: 248 private:
248 DECLARE_EXTENSION_FUNCTION("cast.channel.close", CAST_CHANNEL_CLOSE) 249 DECLARE_EXTENSION_FUNCTION("cast.channel.close", CAST_CHANNEL_CLOSE)
249 250
250 void OnClose(int result); 251 void OnClose(int result);
251 252
252 std::unique_ptr<cast_channel::Close::Params> params_; 253 std::unique_ptr<cast_channel::Close::Params> params_;
254 CastChannelAPI* api_;
253 255
254 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction); 256 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction);
255 }; 257 };
256 258
257 class CastChannelGetLogsFunction : public CastChannelAsyncApiFunction {
258 public:
259 CastChannelGetLogsFunction();
260
261 protected:
262 ~CastChannelGetLogsFunction() override;
263
264 // AsyncApiFunction:
265 bool PrePrepare() override;
266 bool Prepare() override;
267 void AsyncWorkStart() override;
268
269 private:
270 DECLARE_EXTENSION_FUNCTION("cast.channel.getLogs", CAST_CHANNEL_GETLOGS)
271
272 CastChannelAPI* api_;
273
274 DISALLOW_COPY_AND_ASSIGN(CastChannelGetLogsFunction);
275 };
276
277 // TODO(eroman): crbug.com/601171: Delete this entire extension API. It
278 // is currently deprecated and calling the function has no effect.
279 class CastChannelSetAuthorityKeysFunction : public CastChannelAsyncApiFunction {
280 public:
281 CastChannelSetAuthorityKeysFunction();
282
283 protected:
284 ~CastChannelSetAuthorityKeysFunction() override;
285
286 // AsyncApiFunction:
287 bool Prepare() override;
288 void AsyncWorkStart() override;
289
290 private:
291 DECLARE_EXTENSION_FUNCTION("cast.channel.setAuthorityKeys",
292 CAST_CHANNEL_SETAUTHORITYKEYS)
293
294 DISALLOW_COPY_AND_ASSIGN(CastChannelSetAuthorityKeysFunction);
295 };
296
297 } // namespace extensions 259 } // namespace extensions
298 260
299 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ 261 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698