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

Unified Diff: content/common/socket_stream_handle_data.h

Issue 185553014: Revert "Revert 254514 "Revert 254507 "Reland "Move WebKitPlatformSupport..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « content/common/DEPS ('k') | content/common/socket_stream_handle_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/socket_stream_handle_data.h
diff --git a/content/common/socket_stream_handle_data.h b/content/common/socket_stream_handle_data.h
index 3ce79ca47b0fef8c8485844eefe0c1fe2b4bdb4f..113f889e66b2a2d7dbeed5bdb25d4de4f221147f 100644
--- a/content/common/socket_stream_handle_data.h
+++ b/content/common/socket_stream_handle_data.h
@@ -6,20 +6,36 @@
#define CONTENT_RENDERER_SOCKET_STREAM_HANDLE_DATA_H_
#include "base/supports_user_data.h"
-#include "content/common/content_export.h"
+#include "content_export.h"
+
+namespace blink {
+class WebSocketStreamHandle;
+}
namespace content {
// User data stored in each WebSocketStreamHandleImpl.
class SocketStreamHandleData : public base::SupportsUserData::Data {
public:
- explicit SocketStreamHandleData(int render_frame_id)
- : render_frame_id_(render_frame_id) {}
virtual ~SocketStreamHandleData() {}
int render_frame_id() const { return render_frame_id_; }
+ // Creates SocketStreamHandleData object with |render_frame_id| and store it
+ // to |handle|.
+ static void AddToHandle(
+ blink::WebSocketStreamHandle* handle, int render_frame_id);
+
+ // Retrieves the stored user data from blink::WebSocketStreamHandle object.
+ // |handle| must actually be a WebSocketStreamHandleImpl object.
+ CONTENT_EXPORT static const SocketStreamHandleData* ForHandle(
+ blink::WebSocketStreamHandle* handle);
+
private:
+ explicit SocketStreamHandleData(int render_frame_id)
+ : render_frame_id_(render_frame_id) {
+ }
+
int render_frame_id_;
DISALLOW_COPY_AND_ASSIGN(SocketStreamHandleData);
« no previous file with comments | « content/common/DEPS ('k') | content/common/socket_stream_handle_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698