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

Side by Side Diff: content/browser/renderer_host/socket_stream_dispatcher_host.h

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 // Dispatches ViewHostMsg_SocketStream_* messages sent from renderer. 23 // Dispatches ViewHostMsg_SocketStream_* messages sent from renderer.
24 // It also acts as SocketStream::Delegate so that it sends 24 // It also acts as SocketStream::Delegate so that it sends
25 // ViewMsg_SocketStream_* messages back to renderer. 25 // ViewMsg_SocketStream_* messages back to renderer.
26 class SocketStreamDispatcherHost : public content::BrowserMessageFilter, 26 class SocketStreamDispatcherHost : public content::BrowserMessageFilter,
27 public net::SocketStream::Delegate { 27 public net::SocketStream::Delegate {
28 public: 28 public:
29 SocketStreamDispatcherHost( 29 SocketStreamDispatcherHost(
30 ResourceMessageFilter::URLRequestContextSelector* selector, 30 ResourceMessageFilter::URLRequestContextSelector* selector,
31 const content::ResourceContext* resource_context); 31 content::ResourceContext* resource_context);
32 virtual ~SocketStreamDispatcherHost(); 32 virtual ~SocketStreamDispatcherHost();
33 33
34 // content::BrowserMessageFilter methods. 34 // content::BrowserMessageFilter methods.
35 virtual bool OnMessageReceived(const IPC::Message& message, 35 virtual bool OnMessageReceived(const IPC::Message& message,
36 bool* message_was_ok) OVERRIDE; 36 bool* message_was_ok) OVERRIDE;
37 37
38 // The object died, so cancel and detach all requests associated with it. 38 // The object died, so cancel and detach all requests associated with it.
39 void CancelRequestsForProcess(int host_id); 39 void CancelRequestsForProcess(int host_id);
40 40
41 // SocketStream::Delegate methods. 41 // SocketStream::Delegate methods.
(...skipping 16 matching lines...) Expand all
58 void OnSendData(int socket_id, const std::vector<char>& data); 58 void OnSendData(int socket_id, const std::vector<char>& data);
59 void OnCloseReq(int socket_id); 59 void OnCloseReq(int socket_id);
60 60
61 void DeleteSocketStreamHost(int socket_id); 61 void DeleteSocketStreamHost(int socket_id);
62 62
63 net::URLRequestContext* GetURLRequestContext(); 63 net::URLRequestContext* GetURLRequestContext();
64 64
65 IDMap<SocketStreamHost> hosts_; 65 IDMap<SocketStreamHost> hosts_;
66 const scoped_ptr<ResourceMessageFilter::URLRequestContextSelector> 66 const scoped_ptr<ResourceMessageFilter::URLRequestContextSelector>
67 url_request_context_selector_; 67 url_request_context_selector_;
68 const content::ResourceContext* resource_context_; 68 content::ResourceContext* resource_context_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcherHost); 70 DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcherHost);
71 }; 71 };
72 72
73 #endif // CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_ 73 #endif // CONTENT_BROWSER_RENDERER_HOST_SOCKET_STREAM_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698