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

Side by Side Diff: chrome/browser/extensions/api/socket/socket_api.h

Issue 12684008: Multicast socket API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SOCKET_SOCKET_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/extensions/api/api_function.h" 9 #include "chrome/browser/extensions/api/api_function.h"
10 #include "chrome/browser/extensions/api/api_resource_manager.h" 10 #include "chrome/browser/extensions/api/api_resource_manager.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 protected: 342 protected:
343 virtual ~SocketGetNetworkListFunction() {} 343 virtual ~SocketGetNetworkListFunction() {}
344 virtual bool RunImpl() OVERRIDE; 344 virtual bool RunImpl() OVERRIDE;
345 345
346 private: 346 private:
347 void GetNetworkListOnFileThread(); 347 void GetNetworkListOnFileThread();
348 void HandleGetNetworkListError(); 348 void HandleGetNetworkListError();
349 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list); 349 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list);
350 }; 350 };
351 351
352 class SocketJoinGroupFunction : public SocketAsyncApiFunction {
353 public:
354 DECLARE_EXTENSION_FUNCTION("socket.joinGroup", SOCKET_MUILTICAST_JOIN_GROUP)
355
356 SocketJoinGroupFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
357
358 protected:
359 virtual ~SocketJoinGroupFunction();
360
361 // AsyncApiFunction
362 virtual bool Prepare() OVERRIDE;
363 virtual void Work() OVERRIDE;
364
365 private:
366 scoped_ptr<api::socket::JoinGroup::Params> params_;
367 };
368
369 class SocketLeaveGroupFunction : public SocketAsyncApiFunction {
370 public:
371 DECLARE_EXTENSION_FUNCTION("socket.leaveGroup", SOCKET_MUILTICAST_LEAVE_GROUP)
372
373 SocketLeaveGroupFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
374
375 protected:
376 virtual ~SocketLeaveGroupFunction();
377
378 // AsyncApiFunction
379 virtual bool Prepare() OVERRIDE;
380 virtual void Work() OVERRIDE;
381
382 private:
383 scoped_ptr<api::socket::LeaveGroup::Params> params_;
384 };
385
386 class SocketSetMulticastTimeToLiveFunction : public SocketAsyncApiFunction {
387 public:
388 DECLARE_EXTENSION_FUNCTION("socket.setMulticastTimeToLive",
389 SOCKET_MUILTICAST_SET_TIME_TO_LIVE)
390
391 SocketSetMulticastTimeToLiveFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
392
393 protected:
394 virtual ~SocketSetMulticastTimeToLiveFunction();
395
396 // AsyncApiFunction
397 virtual bool Prepare() OVERRIDE;
398 virtual void Work() OVERRIDE;
399
400 private:
401 scoped_ptr<api::socket::SetMulticastTimeToLive::Params> params_;
402 };
403
404 class SocketSetMulticastLoopbackModeFunction : public SocketAsyncApiFunction {
405 public:
406 DECLARE_EXTENSION_FUNCTION("socket.setMulticastLoopbackMode",
407 SOCKET_MUILTICAST_SET_LOOPBACK_MODE)
408
409 SocketSetMulticastLoopbackModeFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
410
411 protected:
412 virtual ~SocketSetMulticastLoopbackModeFunction();
413
414 // AsyncApiFunction
415 virtual bool Prepare() OVERRIDE;
416 virtual void Work() OVERRIDE;
417
418 private:
419 scoped_ptr<api::socket::SetMulticastLoopbackMode::Params> params_;
420 };
421
422 class SocketGetJoinedGroupsFunction : public SocketAsyncApiFunction {
423 public:
424 DECLARE_EXTENSION_FUNCTION("socket.getJoinedGroups",
425 SOCKET_MUILTICAST_GET_JOINED_GROUPS)
426
427 SocketGetJoinedGroupsFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
428
429 protected:
430 virtual ~SocketGetJoinedGroupsFunction();
431
432 // AsyncApiFunction
433 virtual bool Prepare() OVERRIDE;
434 virtual void Work() OVERRIDE;
435
436 private:
437 scoped_ptr<api::socket::GetJoinedGroups::Params> params_;
438 };
352 } // namespace extensions 439 } // namespace extensions
353 440
354 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ 441 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | chrome/browser/extensions/api/socket/socket_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698