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

Side by Side Diff: content/renderer/p2p/socket_dispatcher.h

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // P2PSocketDispatcher is a per-renderer object that dispatchers all 5 // P2PSocketDispatcher is a per-renderer object that dispatchers all
6 // P2P messages received from the browser and relays all P2P messages 6 // P2P messages received from the browser and relays all P2P messages
7 // sent to the browser. P2PSocketClient instances register themselves 7 // sent to the browser. P2PSocketClient instances register themselves
8 // with the dispatcher using RegisterClient() and UnregisterClient(). 8 // with the dispatcher using RegisterClient() and UnregisterClient().
9 // 9 //
10 // Relationship of classes. 10 // Relationship of classes.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 private: 68 private:
69 friend class P2PAsyncAddressResolver; 69 friend class P2PAsyncAddressResolver;
70 friend class P2PSocketClientImpl; 70 friend class P2PSocketClientImpl;
71 71
72 // Send a message asynchronously. 72 // Send a message asynchronously.
73 virtual void Send(IPC::Message* message); 73 virtual void Send(IPC::Message* message);
74 74
75 // IPC::MessageFilter override. Called on IO thread. 75 // IPC::MessageFilter override. Called on IO thread.
76 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 76 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
77 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; 77 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
78 virtual void OnFilterRemoved() OVERRIDE; 78 virtual void OnFilterRemoved() OVERRIDE;
79 virtual void OnChannelClosing() OVERRIDE; 79 virtual void OnChannelClosing() OVERRIDE;
80 80
81 // Returns the IO message loop. 81 // Returns the IO message loop.
82 base::MessageLoopProxy* message_loop(); 82 base::MessageLoopProxy* message_loop();
83 83
84 // Called by P2PSocketClient. 84 // Called by P2PSocketClient.
85 int RegisterClient(P2PSocketClientImpl* client); 85 int RegisterClient(P2PSocketClientImpl* client);
86 void UnregisterClient(int id); 86 void UnregisterClient(int id);
87 void SendP2PMessage(IPC::Message* msg); 87 void SendP2PMessage(IPC::Message* msg);
(...skipping 18 matching lines...) Expand all
106 106
107 scoped_refptr<base::MessageLoopProxy> message_loop_; 107 scoped_refptr<base::MessageLoopProxy> message_loop_;
108 IDMap<P2PSocketClientImpl> clients_; 108 IDMap<P2PSocketClientImpl> clients_;
109 109
110 IDMap<P2PAsyncAddressResolver> host_address_requests_; 110 IDMap<P2PAsyncAddressResolver> host_address_requests_;
111 111
112 bool network_notifications_started_; 112 bool network_notifications_started_;
113 scoped_refptr<ObserverListThreadSafe<NetworkListObserver> > 113 scoped_refptr<ObserverListThreadSafe<NetworkListObserver> >
114 network_list_observers_; 114 network_list_observers_;
115 115
116 IPC::Channel* channel_; 116 IPC::Sender* sender_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher); 118 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher);
119 }; 119 };
120 120
121 } // namespace content 121 } // namespace content
122 122
123 #endif // CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_ 123 #endif // CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_message_filter.cc ('k') | content/renderer/p2p/socket_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698