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 struct CrossOriginServiceWorkerClient; |
| 15 |
| 16 // Receives navigator.connect connection attempts from a child process. |
| 17 // Attempts to find a service that serves the URL the connection is made to |
| 18 // and sets up the actual connection. |
| 19 // Constructed on the UI thread, but all other methods are called on the IO |
| 20 // thread. Typically there is one instance of this class for each renderer |
| 21 // process, and this class lives at least as long as the renderer process is |
| 22 // alive (since this class is refcounted it could outlive the renderer process |
| 23 // if it is still handling a connection attempt). |
| 24 class NavigatorConnectDispatcherHost : public BrowserMessageFilter { |
| 25 public: |
| 26 NavigatorConnectDispatcherHost(); |
| 27 |
| 28 private: |
| 29 ~NavigatorConnectDispatcherHost() override; |
| 30 |
| 31 // BrowserMessageFilter implementation. |
| 32 bool OnMessageReceived(const IPC::Message& message) override; |
| 33 |
| 34 void OnConnect(int thread_id, |
| 35 int request_id, |
| 36 const CrossOriginServiceWorkerClient& client); |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(NavigatorConnectDispatcherHost); |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H
_ |
OLD | NEW |