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

Unified Diff: Source/platform/PermissionCallbacks.h

Issue 705003002: Change the return type of WTF::bind() to |OwnPtr<Function>| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments from yhirano Created 6 years, 1 month 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/modules/filesystem/LocalFileSystem.cpp ('k') | Source/platform/PermissionCallbacks.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/PermissionCallbacks.h
diff --git a/Source/platform/PermissionCallbacks.h b/Source/platform/PermissionCallbacks.h
index 996107a5d428996cfbd4ad71c3bbba2127631147..15c700c706ba7060382e70c3435c07ced1cc2336 100644
--- a/Source/platform/PermissionCallbacks.h
+++ b/Source/platform/PermissionCallbacks.h
@@ -8,6 +8,7 @@
#include "platform/PlatformExport.h"
#include "wtf/Functional.h"
#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -15,17 +16,17 @@ namespace blink {
class PLATFORM_EXPORT PermissionCallbacks {
WTF_MAKE_NONCOPYABLE(PermissionCallbacks);
public:
- static PassOwnPtr<PermissionCallbacks> create(const Closure& allowed, const Closure& denied);
+ static PassOwnPtr<PermissionCallbacks> create(PassOwnPtr<Closure> allowed, PassOwnPtr<Closure> denied);
virtual ~PermissionCallbacks() { }
- void onAllowed() { m_allowed(); }
- void onDenied() { m_denied(); }
+ void onAllowed() { (*m_allowed)(); }
+ void onDenied() { (*m_denied)(); }
private:
- PermissionCallbacks(const Closure& allowed, const Closure& denied);
+ PermissionCallbacks(PassOwnPtr<Closure> allowed, PassOwnPtr<Closure> denied);
- Closure m_allowed;
- Closure m_denied;
+ OwnPtr<Closure> m_allowed;
+ OwnPtr<Closure> m_denied;
};
} // namespace blink
« no previous file with comments | « Source/modules/filesystem/LocalFileSystem.cpp ('k') | Source/platform/PermissionCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698