Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLParserThread.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 <memory> 39 #include "wtf/OwnPtr.h"
40 #include "wtf/PassOwnPtr.h"
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class CORE_EXPORT HTMLParserThread { 44 class CORE_EXPORT HTMLParserThread {
44 USING_FAST_MALLOC(HTMLParserThread); 45 USING_FAST_MALLOC(HTMLParserThread);
45 public: 46 public:
46 static void init(); 47 static void init();
47 static void shutdown(); 48 static void shutdown();
48 49
49 // It is an error to call shared() before init() or after shutdown(); 50 // It is an error to call shared() before init() or after shutdown();
50 static HTMLParserThread* shared(); 51 static HTMLParserThread* shared();
51 52
52 void postTask(std::unique_ptr<CrossThreadClosure>); 53 void postTask(std::unique_ptr<CrossThreadClosure>);
53 54
54 private: 55 private:
55 HTMLParserThread(); 56 HTMLParserThread();
56 ~HTMLParserThread(); 57 ~HTMLParserThread();
57 void setupHTMLParserThread(); 58 void setupHTMLParserThread();
58 void cleanupHTMLParserThread(WaitableEvent*); 59 void cleanupHTMLParserThread(WaitableEvent*);
59 60
60 std::unique_ptr<WebThreadSupportingGC> m_thread; 61 OwnPtr<WebThreadSupportingGC> m_thread;
61 }; 62 };
62 63
63 } // namespace blink 64 } // namespace blink
64 65
65 #endif // HTMLParserThread_h 66 #endif // HTMLParserThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698