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

Unified Diff: content/common/socket_stream_handle_data.h

Issue 9677031: Bind RenderViewImpl routing_id to SocketStreamHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reflects review comments by tony and darin Created 8 years, 9 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: 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
new file mode 100644
index 0000000000000000000000000000000000000000..b98296048e3e3cf45bdf6e9521923d9a95d348f0
--- /dev/null
+++ b/content/common/socket_stream_handle_data.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_SOCKET_STREAM_HANDLE_DATA_H_
+#define CONTENT_RENDERER_SOCKET_STREAM_HANDLE_DATA_H_
+#pragma once
+
+#include "base/supports_user_data.h"
+
+namespace WebKit {
+class WebSocketStreamHandle;
+}
+
+// User data stored in each WebSocketStreamHandleImpl.
+class SocketStreamHandleData : public base::SupportsUserData::Data {
+ public:
+ explicit SocketStreamHandleData(int render_view_id)
+ : render_view_id_(render_view_id) {
+ }
+ virtual ~SocketStreamHandleData() {}
+
+ int render_view_id() const { return render_view_id_; }
+
+ // Picks the stored user data from WebKit::WebSocketStreamHandle object.
wtc 2012/03/19 23:21:03 Nit: Picks => Retrieves or Extracts Ni
Takashi Toyoshima 2012/03/20 00:18:03 Thank you. "Actually" must be the right word that
+ // Virtually, |handle| must be WebSocketStreamHandleImpl object.
+ static const SocketStreamHandleData* ForHandle(
+ WebKit::WebSocketStreamHandle* handle);
+
+ private:
+ int render_view_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(SocketStreamHandleData);
+};
+
+#endif // CONTENT_RENDERER_SOCKET_STREAM_HANDLE_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698