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

Unified Diff: content/common/service_manager/service_manager_connection_impl.h

Issue 2742523005: Revert Change ServiceManagerConnectionImpl to run service request handlers on the IO thread (Closed)
Patch Set: Created 3 years, 9 months 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/common/service_manager/service_manager_connection_impl.h
diff --git a/content/common/service_manager/service_manager_connection_impl.h b/content/common/service_manager/service_manager_connection_impl.h
index 4017d05cb9c66fc6a027f85957b8b4dd48434500..8f4f9bd5c7aa709ef2fe53daf958a947f90a649e 100644
--- a/content/common/service_manager/service_manager_connection_impl.h
+++ b/content/common/service_manager/service_manager_connection_impl.h
@@ -11,7 +11,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
-#include "content/common/content_export.h"
#include "content/public/common/service_manager_connection.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "services/service_manager/public/cpp/identity.h"
@@ -23,8 +22,9 @@ class Connector;
namespace content {
-class CONTENT_EXPORT ServiceManagerConnectionImpl
- : public ServiceManagerConnection {
+class EmbeddedServiceRunner;
+
+class ServiceManagerConnectionImpl : public ServiceManagerConnection {
public:
explicit ServiceManagerConnectionImpl(
service_manager::mojom::ServiceRequest request,
@@ -56,6 +56,8 @@ class CONTENT_EXPORT ServiceManagerConnectionImpl
void OnConnectionLost();
void OnConnect(const service_manager::ServiceInfo& local_info,
const service_manager::ServiceInfo& remote_info);
+ void CreateService(service_manager::mojom::ServiceRequest request,
+ const std::string& name);
void GetInterface(service_manager::mojom::InterfaceProvider* provider,
const std::string& interface_name,
mojo::ScopedMessagePipeHandle request_handle);
@@ -69,6 +71,9 @@ class CONTENT_EXPORT ServiceManagerConnectionImpl
base::Closure connection_lost_handler_;
+ std::unordered_map<std::string, std::unique_ptr<EmbeddedServiceRunner>>
+ embedded_services_;
+ std::unordered_map<std::string, ServiceRequestHandler> request_handlers_;
int next_on_connect_handler_id_ = 0;
std::map<int, OnConnectHandler> on_connect_handlers_;

Powered by Google App Engine
This is Rietveld 408576698