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 26 matching lines...) Expand all Loading... |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 // Initialize the entire Blink (wtf, platform, core, modules and web). | 39 // Initialize the entire Blink (wtf, platform, core, modules and web). |
40 // If you just need wtf and platform, use Platform::initialize instead. | 40 // If you just need wtf and platform, use Platform::initialize instead. |
41 // | 41 // |
42 // Must be called on the thread that will be the main thread before | 42 // Must be called on the thread that will be the main thread before |
43 // using any other public APIs. The provided Platform; must be | 43 // using any other public APIs. The provided Platform; must be |
44 // non-null and must remain valid until the current thread calls shutdown. | 44 // non-null and must remain valid until the current thread calls shutdown. |
45 BLINK_EXPORT void initialize(Platform*); | 45 BLINK_EXPORT void initialize(Platform*); |
46 | 46 |
| 47 // Blink's mojo stuff must be initialized with 2 prerequisites: |
| 48 // 1, Mojo edk initialized; |
| 49 // 2, A message loop is ready for current thread. |
| 50 // For production code it's sure that above 2 are already fullfilled before |
| 51 // calling blink::initialize(), so the mojo stuff will be initialized along with |
| 52 // other stuff(platform, core, modules etc.) as well. But this could be no for |
| 53 // some test codes, when they call blink::initialize() maybe they have not |
| 54 // gotten Mojo edk or message loop ready yet, maybe they would fullfill the |
| 55 // above 2 prerequisites later according with their code logic, in such case we |
| 56 // provide this API to give them another opportunity to initialize the mojo |
| 57 // stuff, which has been skipped by blink::initialize(). |
| 58 BLINK_EXPORT void initializeMojoForTest(); |
| 59 |
47 // Get the V8 Isolate for the main thread. | 60 // Get the V8 Isolate for the main thread. |
48 // initialize must have been called first. | 61 // initialize must have been called first. |
49 BLINK_EXPORT v8::Isolate* mainThreadIsolate(); | 62 BLINK_EXPORT v8::Isolate* mainThreadIsolate(); |
50 | 63 |
51 // Once shutdown, the Platform passed to initialize will no longer | 64 // Once shutdown, the Platform passed to initialize will no longer |
52 // be accessed. No other WebKit objects should be in use when this function is | 65 // be accessed. No other WebKit objects should be in use when this function is |
53 // called. Any background threads created by WebKit are promised to be | 66 // called. Any background threads created by WebKit are promised to be |
54 // terminated by the time this function returns. | 67 // terminated by the time this function returns. |
55 BLINK_EXPORT void shutdown(); | 68 BLINK_EXPORT void shutdown(); |
56 | 69 |
(...skipping 24 matching lines...) Expand all Loading... |
81 // Send memory pressure notification to worker thread isolate. | 94 // Send memory pressure notification to worker thread isolate. |
82 BLINK_EXPORT void MemoryPressureNotificationToWorkerThreadIsolates( | 95 BLINK_EXPORT void MemoryPressureNotificationToWorkerThreadIsolates( |
83 v8::MemoryPressureLevel); | 96 v8::MemoryPressureLevel); |
84 | 97 |
85 // Set the RAIL performance mode on all worker thread isolates. | 98 // Set the RAIL performance mode on all worker thread isolates. |
86 BLINK_EXPORT void setRAILModeOnWorkerThreadIsolates(v8::RAILMode); | 99 BLINK_EXPORT void setRAILModeOnWorkerThreadIsolates(v8::RAILMode); |
87 | 100 |
88 } // namespace blink | 101 } // namespace blink |
89 | 102 |
90 #endif | 103 #endif |
OLD | NEW |