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

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: Patch Set 1 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
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..ba4e58c65455d9c71c35485973947b84318faca9 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -6,7 +6,10 @@
#define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
#pragma once
+#include "base/memory/ref_counted.h"
+#include "base/values.h"
asargent_no_longer_on_chrome 2012/04/16 22:51:13 nit: do you need to include values.h here? I don't
miket_OOO 2012/04/16 23:15:53 Right you are!
#include "chrome/browser/extensions/api/api_function.h"
+#include "net/base/io_buffer.h"
#include <string>
@@ -99,6 +102,10 @@ class SocketReadFunction : public AsyncIOAPIFunction {
};
class SocketWriteFunction : public AsyncIOAPIFunction {
+ public:
+ SocketWriteFunction();
+ virtual ~SocketWriteFunction();
+
protected:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
@@ -106,7 +113,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")
};

Powered by Google App Engine
This is Rietveld 408576698