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

Unified Diff: Source/platform/WebThreadOwnPtr.h

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/UIWebThreadSupportingGC.cpp ('k') | Source/platform/WebThreadPtr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/WebThreadOwnPtr.h
diff --git a/Source/platform/WebThreadOwnPtr.h b/Source/platform/WebThreadOwnPtr.h
new file mode 100644
index 0000000000000000000000000000000000000000..d25c5935fa1a70a656ee902a0ba3bedf563400fe
--- /dev/null
+++ b/Source/platform/WebThreadOwnPtr.h
@@ -0,0 +1,21 @@
+#ifndef WEBTHREADOWNPTR
+#define WEBTHREADOWNPTR
+
+#include "WebThreadPtr.h"
+
+namespace blink {
+
+class WebThreadOwnPtr : public WebThreadPtr {
+ public:
+ WebThreadOwnPtr(WebThread* t) : m_ptr(adoptPtr(t)) {}
+ virtual WebThread& operator*() const { return *m_ptr.get(); }
+ virtual WebThread* operator->() const { return m_ptr.get(); }
+ virtual void clear() { m_ptr.clear(); }
+
+ private:
+ OwnPtr<WebThread> m_ptr;
+};
+
+}
+
+#endif /* ifndef WEBTHREADOWNPTR */
« no previous file with comments | « Source/platform/UIWebThreadSupportingGC.cpp ('k') | Source/platform/WebThreadPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698