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

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

Issue 10790137: Adds socket.getInfo to the socket API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Check for NULL TCPSocket, updated test Created 8 years, 4 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 (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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 virtual ~SocketSetNoDelayFunction(); 272 virtual ~SocketSetNoDelayFunction();
273 273
274 // AsyncApiFunction: 274 // AsyncApiFunction:
275 virtual bool Prepare() OVERRIDE; 275 virtual bool Prepare() OVERRIDE;
276 virtual void Work() OVERRIDE; 276 virtual void Work() OVERRIDE;
277 277
278 private: 278 private:
279 scoped_ptr<api::socket::SetNoDelay::Params> params_; 279 scoped_ptr<api::socket::SetNoDelay::Params> params_;
280 }; 280 };
281 281
282 class SocketGetInfoFunction : public SocketAsyncApiFunction {
283 public:
284 DECLARE_EXTENSION_FUNCTION_NAME("socket.getInfo");
285
286 SocketGetInfoFunction();
287
288 protected:
289 virtual ~SocketGetInfoFunction();
290
291 // AsyncApiFunction:
292 virtual bool Prepare() OVERRIDE;
293 virtual void Work() OVERRIDE;
294
295 private:
296 scoped_ptr<api::socket::GetInfo::Params> params_;
297 };
298
282 } // namespace extensions 299 } // namespace extensions
283 300
284 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ 301 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698