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

Unified Diff: Source/WebKit/chromium/src/WebKit.cpp

Issue 15861022: Build WTF as dll in component build (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | « no previous file | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | Source/bindings/v8/ScriptController.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebKit.cpp
diff --git a/Source/WebKit/chromium/src/WebKit.cpp b/Source/WebKit/chromium/src/WebKit.cpp
index 3eda4cac07ca81eb4a62ed24365ac6d66df1de93..1e4005a707e344bd4668b3532ea996a10c06937f 100644
--- a/Source/WebKit/chromium/src/WebKit.cpp
+++ b/Source/WebKit/chromium/src/WebKit.cpp
@@ -49,6 +49,8 @@
#include "core/platform/graphics/chromium/MediaPlayerPrivateChromium.h"
#include "core/workers/WorkerContextProxy.h"
#include "wtf/Assertions.h"
+#include "wtf/CryptographicallyRandomNumber.h"
+#include "wtf/CurrentTime.h"
#include "wtf/MainThread.h"
#include "wtf/Threading.h"
#include "wtf/UnusedParam.h"
@@ -116,6 +118,26 @@ void initialize(Platform* platform)
}
}
+static double currentTimeFunction()
+{
+ return Platform::current()->currentTime();
+}
+
+static double monotonicallyIncreasingTimeFunction()
+{
+ return Platform::current()->monotonicallyIncreasingTime();
+}
+
+static void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
+{
+ Platform::current()->cryptographicallyRandomValues(buffer, length);
+}
+
+static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* context)
+{
+ Platform::current()->callOnMainThread(function, context);
+}
+
void initializeWithoutV8(Platform* platform)
{
ASSERT(!s_webKitInitialized);
@@ -124,8 +146,11 @@ void initializeWithoutV8(Platform* platform)
ASSERT(platform);
Platform::initialize(platform);
+ WTF::setCurrentTimeFunction(currentTimeFunction);
+ WTF::setMonotonicallyIncreasingTimeFunction(monotonicallyIncreasingTimeFunction);
+ WTF::setRandomSource(cryptographicallyRandomValues);
jamesr 2013/05/25 20:11:39 these have to be set before WTF::initializeThreadi
darin (slow to review) 2013/05/25 21:42:43 Would it make sense for these to become parameters
jamesr 2013/05/26 01:09:10 I've hidden the time setters into a WTF::initializ
WTF::initializeThreading();
- WTF::initializeMainThread();
+ WTF::initializeMainThread(callOnMainThreadFunction);
jamesr 2013/05/25 20:11:39 callOnMainThread is something we should probably r
darin (slow to review) 2013/05/25 21:42:43 +1
WebCore::init();
WebCore::ImageDecodingStore::initializeOnce();
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | Source/bindings/v8/ScriptController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698