| 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef HTMLParserThread_h | 31 #ifndef HTMLParserThread_h |
| 32 #define HTMLParserThread_h | 32 #define HTMLParserThread_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "platform/WaitableEvent.h" | 35 #include "platform/WaitableEvent.h" |
| 36 #include "platform/WebThreadSupportingGC.h" | 36 #include "platform/WebThreadSupportingGC.h" |
| 37 #include "wtf/Allocator.h" | 37 #include "wtf/Allocator.h" |
| 38 #include "wtf/Functional.h" | 38 #include "wtf/Functional.h" |
| 39 #include "wtf/OwnPtr.h" | 39 #include <memory> |
| 40 #include "wtf/PassOwnPtr.h" | |
| 41 | 40 |
| 42 namespace blink { | 41 namespace blink { |
| 43 | 42 |
| 44 class CORE_EXPORT HTMLParserThread { | 43 class CORE_EXPORT HTMLParserThread { |
| 45 USING_FAST_MALLOC(HTMLParserThread); | 44 USING_FAST_MALLOC(HTMLParserThread); |
| 46 public: | 45 public: |
| 47 static void init(); | 46 static void init(); |
| 48 static void shutdown(); | 47 static void shutdown(); |
| 49 | 48 |
| 50 // It is an error to call shared() before init() or after shutdown(); | 49 // It is an error to call shared() before init() or after shutdown(); |
| 51 static HTMLParserThread* shared(); | 50 static HTMLParserThread* shared(); |
| 52 | 51 |
| 53 void postTask(std::unique_ptr<CrossThreadClosure>); | 52 void postTask(std::unique_ptr<CrossThreadClosure>); |
| 54 | 53 |
| 55 private: | 54 private: |
| 56 HTMLParserThread(); | 55 HTMLParserThread(); |
| 57 ~HTMLParserThread(); | 56 ~HTMLParserThread(); |
| 58 void setupHTMLParserThread(); | 57 void setupHTMLParserThread(); |
| 59 void cleanupHTMLParserThread(WaitableEvent*); | 58 void cleanupHTMLParserThread(WaitableEvent*); |
| 60 | 59 |
| 61 OwnPtr<WebThreadSupportingGC> m_thread; | 60 std::unique_ptr<WebThreadSupportingGC> m_thread; |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace blink | 63 } // namespace blink |
| 65 | 64 |
| 66 #endif // HTMLParserThread_h | 65 #endif // HTMLParserThread_h |
| OLD | NEW |