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

Unified Diff: third_party/WebKit/Source/platform/mojo/MojoHelper.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/mojo/MojoHelper.h
diff --git a/third_party/WebKit/Source/platform/mojo/MojoHelper.h b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
index cb3787823cf898aaef902d1ba64e2df021bdd0dc..b278e759b35b31f24c6151f85bafc3cde259b254 100644
--- a/third_party/WebKit/Source/platform/mojo/MojoHelper.h
+++ b/third_party/WebKit/Source/platform/mojo/MojoHelper.h
@@ -23,6 +23,12 @@ R CallWTFFunction(Function<R(Args...)>* functor, Args... args)
}
template <typename R, typename... Args>
+base::Callback<R(Args...)> createBaseCallback(PassOwnPtr<Function<R(Args...)>> functor)
+{
+ return base::Bind(&internal::CallWTFFunction<R, Args...>, base::Owned(functor.leakPtr()));
+}
+
+template <typename R, typename... Args>
base::Callback<R(Args...)> createBaseCallback(std::unique_ptr<Function<R(Args...)>> functor)
{
return base::Bind(&internal::CallWTFFunction<R, Args...>, base::Owned(functor.release()));

Powered by Google App Engine
This is Rietveld 408576698