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

Unified Diff: content/browser/navigator_connect/navigator_connect_dispatcher_host.h

Issue 781723002: Pass navigator.connect calls through to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/navigator_connect/navigator_connect_dispatcher_host.h
diff --git a/content/browser/navigator_connect/navigator_connect_dispatcher_host.h b/content/browser/navigator_connect/navigator_connect_dispatcher_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a18ed00f42557aa5930b4218d7caabd88f831b7
--- /dev/null
+++ b/content/browser/navigator_connect/navigator_connect_dispatcher_host.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H_
+#define CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H_
+
+#include "content/public/browser/browser_message_filter.h"
+
+class GURL;
+
+namespace content {
+
+struct CrossOriginServiceWorkerClient;
+
+// Receives navigator.connect connection attempts from a child process.
+// Attempts to find a service that serves the URL the connection is made to
+// and sets up the actual connection.
+// Constructed on the UI thread, but all other methods are called on the IO
+// thread. Typically there is one instance of this class for each renderer
+// process, and this class lives at least as long as the renderer process is
+// alive (since this class is refcounted it could outlive the renderer process
+// if it is still handling a connection attempt).
+class NavigatorConnectDispatcherHost : public BrowserMessageFilter {
+ public:
+ NavigatorConnectDispatcherHost();
+
+ private:
+ ~NavigatorConnectDispatcherHost() override;
+
+ // BrowserMessageFilter implementation.
+ bool OnMessageReceived(const IPC::Message& message) override;
+
+ void OnConnect(int thread_id,
+ int request_id,
+ const CrossOriginServiceWorkerClient& client);
+
+ DISALLOW_COPY_AND_ASSIGN(NavigatorConnectDispatcherHost);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_DISPATCHER_HOST_H_
« no previous file with comments | « content/browser/navigator_connect/OWNERS ('k') | content/browser/navigator_connect/navigator_connect_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698