OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 16 matching lines...) Expand all Loading... |
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 HTMLParserThread_h | 31 #ifndef HTMLParserThread_h |
32 #define HTMLParserThread_h | 32 #define HTMLParserThread_h |
33 | 33 |
34 #include "platform/WebThreadSupportingGC.h" | 34 #include "platform/WebThreadSupportingGC.h" |
35 #include "wtf/Functional.h" | 35 #include "wtf/Functional.h" |
36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
| 37 #include "wtf/PassOwnPtr.h" |
37 | 38 |
38 namespace blink { | 39 namespace blink { |
39 | 40 |
40 class HTMLParserThread { | 41 class HTMLParserThread { |
41 public: | 42 public: |
42 static void init(); | 43 static void init(); |
43 static void shutdown(); | 44 static void shutdown(); |
44 | 45 |
45 // It is an error to call shared() before init() or after shutdown(); | 46 // It is an error to call shared() before init() or after shutdown(); |
46 static HTMLParserThread* shared(); | 47 static HTMLParserThread* shared(); |
47 | 48 |
48 void postTask(const Closure&); | 49 void postTask(PassOwnPtr<Closure>); |
49 blink::WebThread& platformThread(); | 50 blink::WebThread& platformThread(); |
50 bool isRunning(); | 51 bool isRunning(); |
51 | 52 |
52 private: | 53 private: |
53 HTMLParserThread(); | 54 HTMLParserThread(); |
54 ~HTMLParserThread(); | 55 ~HTMLParserThread(); |
55 void setupHTMLParserThread(); | 56 void setupHTMLParserThread(); |
56 void cleanupHTMLParserThread(); | 57 void cleanupHTMLParserThread(); |
57 | 58 |
58 OwnPtr<WebThreadSupportingGC> m_thread; | 59 OwnPtr<WebThreadSupportingGC> m_thread; |
59 }; | 60 }; |
60 | 61 |
61 } // namespace blink | 62 } // namespace blink |
62 | 63 |
63 #endif // HTMLParserThread_h | 64 #endif // HTMLParserThread_h |
OLD | NEW |