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

Unified Diff: third_party/WebKit/Source/wtf/WTF.h

Issue 1818233003: Merge WTF::initializeMainThread into WTF::initialize (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
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingWin.cpp ('k') | third_party/WebKit/Source/wtf/WTF.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/WTF.h
diff --git a/third_party/WebKit/Source/wtf/WTF.h b/third_party/WebKit/Source/wtf/WTF.h
index 0a542b2b24433b20b5e3ca76736b3d2c03125108..6e49dc239221458e2fbcbd5316ddddd33eb1b3d0 100644
--- a/third_party/WebKit/Source/wtf/WTF.h
+++ b/third_party/WebKit/Source/wtf/WTF.h
@@ -36,11 +36,20 @@
namespace WTF {
+typedef void MainThreadFunction(void*);
+
// This function must be called exactly once from the main thread before using anything else in WTF.
-WTF_EXPORT void initialize();
+WTF_EXPORT void initialize(void (*)(MainThreadFunction, void*));
WTF_EXPORT void shutdown();
WTF_EXPORT bool isShutdown();
+WTF_EXPORT bool isMainThread();
+
+namespace internal {
+void callOnMainThread(MainThreadFunction*, void* context);
+} // namespace internal
} // namespace WTF
+using WTF::isMainThread;
+
#endif // WTF_h
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingWin.cpp ('k') | third_party/WebKit/Source/wtf/WTF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698