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 15 matching lines...) Expand all Loading... |
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 #ifndef SKY_ENGINE_PUBLIC_WEB_SKY_H_ | 31 #ifndef SKY_ENGINE_PUBLIC_WEB_SKY_H_ |
32 #define SKY_ENGINE_PUBLIC_WEB_SKY_H_ | 32 #define SKY_ENGINE_PUBLIC_WEB_SKY_H_ |
33 | 33 |
34 #include "../platform/Platform.h" | 34 #include "../platform/Platform.h" |
35 | 35 |
36 namespace v8 { | |
37 class Isolate; | |
38 } | |
39 | |
40 namespace blink { | 36 namespace blink { |
41 | 37 |
42 // Must be called on the thread that will be the main WebKit thread before | 38 // Must be called on the thread that will be the main WebKit thread before |
43 // using any other WebKit APIs. The provided Platform; must be | 39 // using any other WebKit APIs. The provided Platform; must be |
44 // non-null and must remain valid until the current thread calls shutdown. | 40 // non-null and must remain valid until the current thread calls shutdown. |
45 BLINK_EXPORT void initialize(Platform*); | 41 BLINK_EXPORT void initialize(Platform*); |
46 | 42 |
47 // Must be called on the thread that will be the main WebKit thread before | |
48 // using any other WebKit APIs. The provided Platform must be | |
49 // non-null and must remain valid until the current thread calls shutdown. | |
50 // | |
51 // This is a special variant of initialize that does not intitialize V8. | |
52 BLINK_EXPORT void initializeWithoutV8(Platform*); | |
53 | |
54 // Get the V8 Isolate for the main thread. | |
55 // initialize must have been called first. | |
56 BLINK_EXPORT v8::Isolate* mainThreadIsolate(); | |
57 | |
58 // Once shutdown, the Platform passed to initialize will no longer | 43 // Once shutdown, the Platform passed to initialize will no longer |
59 // be accessed. No other WebKit objects should be in use when this function is | 44 // be accessed. No other WebKit objects should be in use when this function is |
60 // called. Any background threads created by WebKit are promised to be | 45 // called. Any background threads created by WebKit are promised to be |
61 // terminated by the time this function returns. | 46 // terminated by the time this function returns. |
62 BLINK_EXPORT void shutdown(); | 47 BLINK_EXPORT void shutdown(); |
63 | 48 |
64 // Once shutdown, the Platform passed to initializeWithoutV8 will no longer | |
65 // be accessed. No other WebKit objects should be in use when this function is | |
66 // called. Any background threads created by WebKit are promised to be | |
67 // terminated by the time this function returns. | |
68 // | |
69 // If initializeWithoutV8() was used to initialize WebKit, shutdownWithoutV8 | |
70 // must be called to shut it down again. | |
71 BLINK_EXPORT void shutdownWithoutV8(); | |
72 | |
73 // Alters the rendering of content to conform to a fixed set of rules. | 49 // Alters the rendering of content to conform to a fixed set of rules. |
74 BLINK_EXPORT void setLayoutTestMode(bool); | 50 BLINK_EXPORT void setLayoutTestMode(bool); |
75 BLINK_EXPORT bool layoutTestMode(); | 51 BLINK_EXPORT bool layoutTestMode(); |
76 | 52 |
77 // Alters the rendering of fonts for layout tests. | 53 // Alters the rendering of fonts for layout tests. |
78 BLINK_EXPORT void setFontAntialiasingEnabledForTest(bool); | 54 BLINK_EXPORT void setFontAntialiasingEnabledForTest(bool); |
79 BLINK_EXPORT bool fontAntialiasingEnabledForTest(); | 55 BLINK_EXPORT bool fontAntialiasingEnabledForTest(); |
80 | 56 |
81 // Enables the named log channel. See WebCore/platform/Logging.h for details. | 57 // Enables the named log channel. See WebCore/platform/Logging.h for details. |
82 BLINK_EXPORT void enableLogChannel(const char*); | 58 BLINK_EXPORT void enableLogChannel(const char*); |
83 | 59 |
84 } // namespace blink | 60 } // namespace blink |
85 | 61 |
86 #endif // SKY_ENGINE_PUBLIC_WEB_SKY_H_ | 62 #endif // SKY_ENGINE_PUBLIC_WEB_SKY_H_ |
OLD | NEW |