| OLD | NEW | 
|    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  Loading... | 
|   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::Sender* sender) OVERRIDE; |   77   virtual void OnFilterAdded(IPC::Channel* channel) 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  Loading... | 
|  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::Sender* sender_; |  116   IPC::Channel* channel_; | 
|  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_ | 
| OLD | NEW |