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

Unified Diff: content/browser/renderer_host/socket_stream_dispatcher_host.h

Issue 655253006: Remove old WebSocket implementation from content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 2 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/browser/renderer_host/socket_stream_dispatcher_host.h
diff --git a/content/browser/renderer_host/socket_stream_dispatcher_host.h b/content/browser/renderer_host/socket_stream_dispatcher_host.h
deleted file mode 100644
index af1b83b7564d816cf14d37c61d3e1174e4aa376a..0000000000000000000000000000000000000000
--- a/content/browser/renderer_host/socket_stream_dispatcher_host.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// 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_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_
-#define CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_
-
-#include <vector>
-
-#include "base/callback_forward.h"
-#include "base/id_map.h"
-#include "content/public/browser/browser_message_filter.h"
-#include "content/public/common/resource_type.h"
-#include "net/socket_stream/socket_stream.h"
-
-class GURL;
-
-namespace net {
-class SSLInfo;
-}
-
-namespace content {
-class ResourceContext;
-class SocketStreamHost;
-
-// Dispatches ViewHostMsg_SocketStream_* messages sent from renderer.
-// It also acts as SocketStream::Delegate so that it sends
-// ViewMsg_SocketStream_* messages back to renderer.
-class SocketStreamDispatcherHost : public BrowserMessageFilter,
- public net::SocketStream::Delegate {
- public:
- typedef base::Callback<net::URLRequestContext*(ResourceType)>
- GetRequestContextCallback;
- SocketStreamDispatcherHost(
- int render_process_id,
- const GetRequestContextCallback& request_context_callback,
- ResourceContext* resource_context);
-
- // BrowserMessageFilter:
- bool OnMessageReceived(const IPC::Message& message) override;
-
- // Make this object inactive.
- // Remove all active SocketStreamHost objects.
- void Shutdown();
-
- // SocketStream::Delegate:
- void OnConnected(net::SocketStream* socket,
- int max_pending_send_allowed) override;
- void OnSentData(net::SocketStream* socket, int amount_sent) override;
- void OnReceivedData(net::SocketStream* socket,
- const char* data,
- int len) override;
- void OnClose(net::SocketStream* socket) override;
- void OnError(const net::SocketStream* socket, int error) override;
- void OnSSLCertificateError(net::SocketStream* socket,
- const net::SSLInfo& ssl_info,
- bool fatal) override;
- bool CanGetCookies(net::SocketStream* socket, const GURL& url) override;
- bool CanSetCookie(net::SocketStream* request,
- const GURL& url,
- const std::string& cookie_line,
- net::CookieOptions* options) override;
-
- protected:
- ~SocketStreamDispatcherHost() override;
-
- private:
- // Message handlers called by OnMessageReceived.
- void OnConnect(int render_frame_id, const GURL& url, int socket_id);
- void OnSendData(int socket_id, const std::vector<char>& data);
- void OnCloseReq(int socket_id);
-
- void DeleteSocketStreamHost(int socket_id);
-
- net::URLRequestContext* GetURLRequestContext();
-
- IDMap<SocketStreamHost> hosts_;
- int render_process_id_;
- GetRequestContextCallback request_context_callback_;
- ResourceContext* resource_context_;
-
- bool on_shutdown_;
-
- DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcherHost);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698