| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "public/web/Sky.h" | 32 #include "public/web/Sky.h" |
| 33 | 33 |
| 34 #include "base/message_loop/message_loop.h" | 34 #include "base/message_loop/message_loop.h" |
| 35 #include "base/rand_util.h" |
| 35 #include "bindings/core/v8/V8Binding.h" | 36 #include "bindings/core/v8/V8Binding.h" |
| 36 #include "bindings/core/v8/V8GCController.h" | 37 #include "bindings/core/v8/V8GCController.h" |
| 37 #include "bindings/core/v8/V8Initializer.h" | 38 #include "bindings/core/v8/V8Initializer.h" |
| 38 #include "core/Init.h" | 39 #include "core/Init.h" |
| 39 #include "core/animation/AnimationClock.h" | 40 #include "core/animation/AnimationClock.h" |
| 40 #include "core/dom/Microtask.h" | 41 #include "core/dom/Microtask.h" |
| 41 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
| 42 #include "core/page/Page.h" | 43 #include "core/page/Page.h" |
| 43 #include "gin/public/v8_platform.h" | 44 #include "gin/public/v8_platform.h" |
| 44 #include "mojo/common/message_pump_mojo.h" | 45 #include "mojo/common/message_pump_mojo.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 return Platform::current()->currentTime(); | 139 return Platform::current()->currentTime(); |
| 139 } | 140 } |
| 140 | 141 |
| 141 static double monotonicallyIncreasingTimeFunction() | 142 static double monotonicallyIncreasingTimeFunction() |
| 142 { | 143 { |
| 143 return Platform::current()->monotonicallyIncreasingTime(); | 144 return Platform::current()->monotonicallyIncreasingTime(); |
| 144 } | 145 } |
| 145 | 146 |
| 146 static void cryptographicallyRandomValues(unsigned char* buffer, size_t length) | 147 static void cryptographicallyRandomValues(unsigned char* buffer, size_t length) |
| 147 { | 148 { |
| 148 Platform::current()->cryptographicallyRandomValues(buffer, length); | 149 base::RandBytes(buffer, length); |
| 149 } | 150 } |
| 150 | 151 |
| 151 static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* con
text) | 152 static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* con
text) |
| 152 { | 153 { |
| 153 Platform::current()->callOnMainThread(function, context); | 154 Platform::current()->callOnMainThread(function, context); |
| 154 } | 155 } |
| 155 | 156 |
| 156 void initializeWithoutV8(Platform* platform) | 157 void initializeWithoutV8(Platform* platform) |
| 157 { | 158 { |
| 158 ASSERT(!s_webKitInitialized); | 159 ASSERT(!s_webKitInitialized); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void enableLogChannel(const char* name) | 221 void enableLogChannel(const char* name) |
| 221 { | 222 { |
| 222 #if !LOG_DISABLED | 223 #if !LOG_DISABLED |
| 223 WTFLogChannel* channel = getChannelFromName(name); | 224 WTFLogChannel* channel = getChannelFromName(name); |
| 224 if (channel) | 225 if (channel) |
| 225 channel->state = WTFLogChannelOn; | 226 channel->state = WTFLogChannelOn; |
| 226 #endif // !LOG_DISABLED | 227 #endif // !LOG_DISABLED |
| 227 } | 228 } |
| 228 | 229 |
| 229 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |