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

Unified Diff: third_party/WebKit/public/web/WebKit.h

Issue 2402983002: [TimeZoneMonitor] Decouple renderer side impl from content to blink. (Closed)
Patch Set: webkit_unit_tests does not need to init mojo edk any more by itself Created 4 years, 2 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/public/web/WebKit.h
diff --git a/third_party/WebKit/public/web/WebKit.h b/third_party/WebKit/public/web/WebKit.h
index ddb13d9351f33b75946d3c056abd696d147e9d33..13995d6b68b4de69d83efdf1d951aa9b34cd4c13 100644
--- a/third_party/WebKit/public/web/WebKit.h
+++ b/third_party/WebKit/public/web/WebKit.h
@@ -44,6 +44,19 @@ namespace blink {
// non-null and must remain valid until the current thread calls shutdown.
BLINK_EXPORT void initialize(Platform*);
+// Blink's mojo stuff must be initialized with 2 prerequisites:
+// 1, Mojo edk initialized;
+// 2, A message loop is ready for current thread.
+// For production code it's sure that above 2 are already fullfilled before
+// calling blink::initialize(), so the mojo stuff will be initialized along with
+// other stuff(platform, core, modules etc.) as well. But this could be no for
+// some test codes, when they call blink::initialize() maybe they have not
+// gotten Mojo edk or message loop ready yet, maybe they would fullfill the
+// above 2 prerequisites later according with their code logic, in such case we
+// provide this API to give them another opportunity to initialize the mojo
+// stuff, which has been skipped by blink::initialize().
+BLINK_EXPORT void initializeMojo();
+
// Get the V8 Isolate for the main thread.
// initialize must have been called first.
BLINK_EXPORT v8::Isolate* mainThreadIsolate();

Powered by Google App Engine
This is Rietveld 408576698