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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.h

Issue 10095020: Allow socket API to send binary data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Jeremy's judgments. Antonits. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/socket/socket_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index 2f97bfe81d62cb358a626f9279d969a33620be59..a9efeaa55a48e383625f2f0d1ca4cde4b1800314 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -6,7 +6,9 @@
#define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
#pragma once
+#include "base/memory/ref_counted.h"
#include "chrome/browser/extensions/api/api_function.h"
+#include "net/base/io_buffer.h"
#include <string>
@@ -99,6 +101,10 @@ class SocketReadFunction : public AsyncIOAPIFunction {
};
class SocketWriteFunction : public AsyncIOAPIFunction {
+ public:
+ SocketWriteFunction();
+ virtual ~SocketWriteFunction();
+
protected:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
@@ -106,7 +112,7 @@ class SocketWriteFunction : public AsyncIOAPIFunction {
private:
int socket_id_;
- std::string message_;
+ scoped_refptr<net::IOBufferWithSize> io_buffer_;
DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.write")
};
« no previous file with comments | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698