summaryrefslogtreecommitdiff
path: root/chromium/content/utility/utility_thread_impl.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-12 09:13:00 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-16 09:58:26 +0000
commit03561cae90f1d99b5c54b1ef3be69f10e882b25e (patch)
treecc5f0958e823c044e7ae51cc0117fe51432abe5e /chromium/content/utility/utility_thread_impl.h
parentfa98118a45f7e169f8846086dc2c22c49a8ba310 (diff)
downloadqtwebengine-chromium-03561cae90f1d99b5c54b1ef3be69f10e882b25e.tar.gz
BASELINE: Update Chromium to 88.0.4324.208
Change-Id: I3ae87d23e4eff4b4a469685658740a213600c667 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/utility/utility_thread_impl.h')
-rw-r--r--chromium/content/utility/utility_thread_impl.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/chromium/content/utility/utility_thread_impl.h b/chromium/content/utility/utility_thread_impl.h
index 885b4ccd5d9..4c82029fee7 100644
--- a/chromium/content/utility/utility_thread_impl.h
+++ b/chromium/content/utility/utility_thread_impl.h
@@ -7,13 +7,19 @@
#include <memory>
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "build/build_config.h"
#include "content/child/child_thread_impl.h"
#include "content/public/utility/utility_thread.h"
+#include "mojo/public/cpp/bindings/generic_pending_receiver.h"
#include "third_party/blink/public/platform/platform.h"
+namespace mojo {
+class ServiceFactory;
+}
+
namespace content {
class UtilityServiceFactory;
@@ -34,6 +40,17 @@ class UtilityThreadImpl : public UtilityThread,
void EnsureBlinkInitializedWithSandboxSupport() override;
#endif
+ // Handles an incoming service interface receiver from a browser-side
+ // ServiceProcessHost. This is called only if `receiver` didn't first match
+ // any registered IO-thread service handlers in this process. If successful,
+ // `termination_callback` will eventually be invoked when the new service
+ // instance terminates.
+ //
+ // If there is no matching service, `receiver` is discarded and
+ // `termination_callback` is invoked immediately.
+ void HandleServiceRequest(mojo::GenericPendingReceiver receiver,
+ base::OnceClosure termination_callback);
+
private:
void EnsureBlinkInitializedInternal(bool sandbox_support);
void Init();
@@ -47,9 +64,16 @@ class UtilityThreadImpl : public UtilityThread,
// blink::Platform implementation if needed.
std::unique_ptr<blink::Platform> blink_platform_impl_;
- // Helper to handle incoming RunService calls.
+ // Helper to handle incoming RunService calls. Note that this is deprecated
+ // and only remains in support of some embedders which haven't migrated away
+ // from Service Manager-based services yet.
std::unique_ptr<UtilityServiceFactory> service_factory_;
+ // The ServiceFactory used to handle incoming service requests from a
+ // browser-side ServiceProcessHost. Any service registered here will run on
+ // the main thread of its service process.
+ std::unique_ptr<mojo::ServiceFactory> main_thread_services_;
+
DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl);
};