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

Unified Diff: third_party/WebKit/Source/platform/mojo/MojoHelper.h

Issue 2402983002: [TimeZoneMonitor] Decouple renderer side impl from content to blink. (Closed)
Patch Set: Rebase only Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/mojo/MojoHelper.h
diff --git a/third_party/WebKit/Source/platform/mojo/MojoHelper.h b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
index 073e84ed9fe05d828ef33a839aefdce7d71df036..8f0f00d2dabc823478b68f84da6cb006c9c7f7e3 100644
--- a/third_party/WebKit/Source/platform/mojo/MojoHelper.h
+++ b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
@@ -5,6 +5,7 @@
#ifndef MojoHelper_h
#define MojoHelper_h
+#include "base/message_loop/message_loop.h"
#include "mojo/public/cpp/bindings/wtf_array.h"
#include "platform/heap/HeapAllocator.h"
#include <utility>
@@ -26,4 +27,16 @@ struct TypeConverter<WTFArray<T>, blink::HeapVector<E>> {
} // namespace mojo
+namespace blink {
+
+// Used to get whether message loop is ready for current thread, to help
+// blink::initialize() determining whether can initialize mojo stuff or not.
+// TODO(leonhsl): http://crbug.com/660274 Remove this API by ensuring
+// a message loop before calling blink::initialize().
+inline bool canInitializeMojo() {
+ return base::MessageLoop::current();
+}
+
+} // namespace blink
+
#endif // MojoHelper_h
« no previous file with comments | « third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698