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

Side by Side Diff: content/child/websocket_bridge.cc

Issue 308513004: Pass render frame ID to WebSocketBridge (Chromium side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/child/websocket_bridge.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/child/websocket_bridge.h" 5 #include "content/child/websocket_bridge.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 37
38 namespace content { 38 namespace content {
39 39
40 namespace { 40 namespace {
41 41
42 const unsigned short kAbnormalShutdownOpCode = 1006; 42 const unsigned short kAbnormalShutdownOpCode = 1006;
43 43
44 } // namespace 44 } // namespace
45 45
46 WebSocketBridge::WebSocketBridge() 46 WebSocketBridge::WebSocketBridge()
47 : channel_id_(kInvalidChannelId), client_(NULL) {} 47 : channel_id_(kInvalidChannelId),
48 render_frame_id_(MSG_ROUTING_NONE),
49 client_(NULL) {}
48 50
49 WebSocketBridge::~WebSocketBridge() { 51 WebSocketBridge::~WebSocketBridge() {
50 if (channel_id_ != kInvalidChannelId) { 52 if (channel_id_ != kInvalidChannelId) {
51 // The connection is abruptly disconnected by the renderer without 53 // The connection is abruptly disconnected by the renderer without
52 // closing handshake. 54 // closing handshake.
53 ChildThread::current()->Send( 55 ChildThread::current()->Send(
54 new WebSocketMsg_DropChannel(channel_id_, 56 new WebSocketMsg_DropChannel(channel_id_,
55 false, 57 false,
56 kAbnormalShutdownOpCode, 58 kAbnormalShutdownOpCode,
57 std::string())); 59 std::string()));
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return; 293 return;
292 WebSocketDispatcher* dispatcher = 294 WebSocketDispatcher* dispatcher =
293 ChildThread::current()->websocket_dispatcher(); 295 ChildThread::current()->websocket_dispatcher();
294 dispatcher->RemoveBridge(channel_id_); 296 dispatcher->RemoveBridge(channel_id_);
295 297
296 channel_id_ = kInvalidChannelId; 298 channel_id_ = kInvalidChannelId;
297 client_ = NULL; 299 client_ = NULL;
298 } 300 }
299 301
300 } // namespace content 302 } // namespace content
OLDNEW
« no previous file with comments | « content/child/websocket_bridge.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698