This source file includes following definitions.
- connect_delegate_
- CreateBasicStream
- CreateSpdyStream
#include "net/websockets/websocket_handshake_stream_create_helper.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "net/socket/client_socket_handle.h"
#include "net/spdy/spdy_session.h"
#include "net/websockets/websocket_basic_handshake_stream.h"
namespace net {
WebSocketHandshakeStreamCreateHelper::WebSocketHandshakeStreamCreateHelper(
WebSocketStream::ConnectDelegate* connect_delegate,
const std::vector<std::string>& requested_subprotocols)
: requested_subprotocols_(requested_subprotocols),
stream_(NULL),
connect_delegate_(connect_delegate) {}
WebSocketHandshakeStreamCreateHelper::~WebSocketHandshakeStreamCreateHelper() {}
WebSocketHandshakeStreamBase*
WebSocketHandshakeStreamCreateHelper::CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) {
std::vector<std::string> extensions(
1, "permessage-deflate; client_max_window_bits");
return stream_ =
new WebSocketBasicHandshakeStream(connection.Pass(),
connect_delegate_,
using_proxy,
requested_subprotocols_,
extensions);
}
WebSocketHandshakeStreamBase*
WebSocketHandshakeStreamCreateHelper::CreateSpdyStream(
const base::WeakPtr<SpdySession>& session,
bool use_relative_url) {
NOTREACHED() << "Not implemented";
return NULL;
}
}