OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H_ |
| 7 |
| 8 #include "content/public/browser/browser_message_filter.h" |
| 9 |
| 10 class GURL; |
| 11 |
| 12 namespace content { |
| 13 |
| 14 // Receives navigator.connect connection attempts from a child process. |
| 15 // Attempts to find a service that serves the URL the connection is made to |
| 16 // and sets up the actual connection. |
| 17 // Constructed on the UI thread, but all other methods are called on the IO |
| 18 // thread. Typically there is one instance of this class for each renderer |
| 19 // process, and this class lives at least as long as the renderer process is |
| 20 // alive (since this class is refcounted it could outlive the renderer process |
| 21 // if it is still handling a connection attempt). |
| 22 class NavigatorConnectDispatcherHost : public BrowserMessageFilter { |
| 23 public: |
| 24 NavigatorConnectDispatcherHost(); |
| 25 |
| 26 private: |
| 27 ~NavigatorConnectDispatcherHost() override; |
| 28 |
| 29 // BrowserMessageFilter implementation. |
| 30 bool OnMessageReceived(const IPC::Message& message) override; |
| 31 |
| 32 void OnConnect(int thread_id, |
| 33 int request_id, |
| 34 const GURL& target_url, |
| 35 int message_port_id); |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(NavigatorConnectDispatcherHost); |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H
_ |
OLD | NEW |