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

Unified Diff: third_party/WebKit/Source/wtf/Functional.h

Issue 2132973002: Replace a WTF::Function conversion operator to be a function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/wtf/Functional.h
diff --git a/third_party/WebKit/Source/wtf/Functional.h b/third_party/WebKit/Source/wtf/Functional.h
index c23fdc7ef54b4f9943bafff3c162db667f9cc85e..caad8c2d2531fb21fa3457dee4be6c5fd2db55c7 100644
--- a/third_party/WebKit/Source/wtf/Functional.h
+++ b/third_party/WebKit/Source/wtf/Functional.h
@@ -229,9 +229,9 @@ public:
return m_callback.Run(std::forward<Args>(args)...);
}
- explicit operator base::Callback<R(Args...)>()
+ friend base::Callback<R(Args...)> convertToBaseCallback(std::unique_ptr<Function> function)
hiroshige 2016/07/08 05:42:04 Just checking: is this syntax allowed in the Blink
tzik 2016/07/08 05:53:50 I think so. I found nothing that bans this in our
{
- return m_callback;
+ return std::move(function->m_callback);
}
private:
« no previous file with comments | « third_party/WebKit/Source/platform/mojo/MojoHelper.h ('k') | third_party/WebKit/public/platform/functional/WebFunction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698