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

Unified Diff: webkit/glue/websocketstreamhandle_impl.cc

Issue 8602002: Move some webkit_glue embedder functions into WebKitPlatformSupport virtual methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright year Created 9 years, 1 month 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 | « webkit/glue/websocketstreamhandle_impl.h ('k') | webkit/glue/weburlloader_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/websocketstreamhandle_impl.cc
diff --git a/webkit/glue/websocketstreamhandle_impl.cc b/webkit/glue/websocketstreamhandle_impl.cc
index 9e2689693a71e4d354d7e592fbbb644180770b48..d9cf197efaeb2f6c6b94d419a36f0b82c0f30c24 100644
--- a/webkit/glue/websocketstreamhandle_impl.cc
+++ b/webkit/glue/websocketstreamhandle_impl.cc
@@ -15,6 +15,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandleClient.h"
+#include "webkit/glue/webkitplatformsupport_impl.h"
#include "webkit/glue/websocketstreamhandle_bridge.h"
#include "webkit/glue/websocketstreamhandle_delegate.h"
@@ -33,7 +34,7 @@ class WebSocketStreamHandleImpl::Context
client_ = client;
}
- void Connect(const WebKit::WebURL& url);
+ void Connect(const WebKit::WebURL& url, WebKitPlatformSupportImpl* platform);
bool Send(const WebKit::WebData& data);
void Close();
@@ -71,10 +72,12 @@ WebSocketStreamHandleImpl::Context::Context(WebSocketStreamHandleImpl* handle)
bridge_(NULL) {
}
-void WebSocketStreamHandleImpl::Context::Connect(const WebKit::WebURL& url) {
+void WebSocketStreamHandleImpl::Context::Connect(
+ const WebKit::WebURL& url,
+ WebKitPlatformSupportImpl* platform) {
VLOG(1) << "Connect url=" << url;
DCHECK(!bridge_);
- bridge_ = WebSocketStreamHandleBridge::Create(handle_, this);
+ bridge_ = platform->CreateWebSocketBridge(handle_, this);
AddRef(); // Will be released by DidClose().
bridge_->Connect(url);
}
@@ -138,8 +141,10 @@ void WebSocketStreamHandleImpl::Context::DidClose(
// WebSocketStreamHandleImpl ------------------------------------------------
-WebSocketStreamHandleImpl::WebSocketStreamHandleImpl()
- : ALLOW_THIS_IN_INITIALIZER_LIST(context_(new Context(this))) {
+WebSocketStreamHandleImpl::WebSocketStreamHandleImpl(
+ WebKitPlatformSupportImpl* platform)
+ : ALLOW_THIS_IN_INITIALIZER_LIST(context_(new Context(this))),
+ platform_(platform) {
}
WebSocketStreamHandleImpl::~WebSocketStreamHandleImpl() {
@@ -155,7 +160,7 @@ void WebSocketStreamHandleImpl::connect(
DCHECK(!context_->client());
context_->set_client(client);
- context_->Connect(url);
+ context_->Connect(url, platform_);
}
bool WebSocketStreamHandleImpl::send(const WebKit::WebData& data) {
« no previous file with comments | « webkit/glue/websocketstreamhandle_impl.h ('k') | webkit/glue/weburlloader_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698