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

Unified Diff: third_party/WebKit/Source/platform/exported/Platform.cpp

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/platform/exported/Platform.cpp
diff --git a/third_party/WebKit/Source/platform/exported/Platform.cpp b/third_party/WebKit/Source/platform/exported/Platform.cpp
index fc1be64c0e13c2823212981e194de96d581722d6..5f89251a5329aca9b39ed2abd3434304997078a9 100644
--- a/third_party/WebKit/Source/platform/exported/Platform.cpp
+++ b/third_party/WebKit/Source/platform/exported/Platform.cpp
@@ -37,11 +37,19 @@
#include "platform/heap/GCTaskRunner.h"
#include "platform/web_memory_dump_provider_adapter.h"
#include "public/platform/Platform.h"
+#include "public/platform/ServiceRegistry.h"
#include "public/platform/WebPrerenderingSupport.h"
#include "wtf/HashMap.h"
#include "wtf/OwnPtr.h"
namespace blink {
+namespace {
+
+class EmptyServiceRegistry : public ServiceRegistry {
+ void connectToRemoteService(const char* name, mojo::ScopedMessagePipeHandle) override {}
+};
+
+}
static Platform* s_platform = nullptr;
using ProviderToAdapterMap = HashMap<WebMemoryDumpProvider*, OwnPtr<WebMemoryDumpProviderAdapter>>;
@@ -177,4 +185,10 @@ void Platform::unregisterMemoryDumpProvider(WebMemoryDumpProvider* provider)
memoryDumpProviders().remove(it);
}
+ServiceRegistry* Platform::serviceRegistry()
+{
+ DEFINE_STATIC_LOCAL(EmptyServiceRegistry, emptyServiceRegistry, ());
+ return &emptyServiceRegistry;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698