OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_TEST_TEST_WEBKIT_PLATFORM_H_ | |
6 #define CC_TEST_TEST_WEBKIT_PLATFORM_H_ | |
7 | |
8 #include "base/rand_util.h" | |
9 #include "base/threading/thread_local_storage.h" | |
10 #include "cc/test/test_webkit_platform.h" | |
11 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" | |
12 #include "webkit/compositor_bindings/web_compositor_support_impl.h" | |
13 #include "webkit/glue/webthread_impl.h" | |
14 | |
15 using webkit_glue::WebThreadImplForMessageLoop; | |
16 | |
17 namespace cc { | |
18 | |
19 class TestWebKitPlatform : public WebKit::Platform { | |
20 public: | |
21 TestWebKitPlatform(); | |
22 virtual ~TestWebKitPlatform(); | |
23 | |
24 virtual WebKit::WebCompositorSupport* compositorSupport(); | |
25 | |
26 virtual void cryptographicallyRandomValues( | |
27 unsigned char* buffer, size_t length); | |
28 | |
29 virtual WebKit::WebThread* createThread(const char* name); | |
30 | |
31 virtual WebKit::WebThread* currentThread(); | |
32 | |
33 virtual double currentTime(); | |
34 | |
35 virtual double monotonicallyIncreasingTime(); | |
36 | |
37 private: | |
38 base::ThreadLocalStorage::Slot current_thread_slot_; | |
39 webkit::WebCompositorSupportImpl compositor_support_; | |
40 }; | |
41 | |
42 } // namespace cc | |
43 | |
44 #endif // CC_TEST_TEST_WEBKIT_PLATFORM_H_ | |
OLD | NEW |