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

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

Issue 15039012: Add the ability to use AllowAddressReuse for UDP sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master Created 7 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 protected: 429 protected:
430 virtual ~SocketGetJoinedGroupsFunction(); 430 virtual ~SocketGetJoinedGroupsFunction();
431 431
432 // AsyncApiFunction 432 // AsyncApiFunction
433 virtual bool Prepare() OVERRIDE; 433 virtual bool Prepare() OVERRIDE;
434 virtual void Work() OVERRIDE; 434 virtual void Work() OVERRIDE;
435 435
436 private: 436 private:
437 scoped_ptr<api::socket::GetJoinedGroups::Params> params_; 437 scoped_ptr<api::socket::GetJoinedGroups::Params> params_;
438 }; 438 };
439
440 class SocketAllowAddressReuseFunction : public SocketAsyncApiFunction {
441 public:
442 DECLARE_EXTENSION_FUNCTION("socket.allowAddressReuse",
443 SOCKET_ALLOW_ADDRESS_REUSE)
444
445 SocketAllowAddressReuseFunction();
446
447 protected:
448 virtual ~SocketAllowAddressReuseFunction();
449
450 // AsyncApiFunction
451 virtual bool Prepare() OVERRIDE;
452 virtual void Work() OVERRIDE;
453
454 private:
455 scoped_ptr<api::socket::AllowAddressReuse::Params> params_;
456 };
457
439 } // namespace extensions 458 } // namespace extensions
440 459
441 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ 460 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698