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

Unified Diff: third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h

Issue 2389973002: Use std::unique_ptr to signal ownership transfer in WebCompositorSupport (Closed)
Patch Set: rebase Created 4 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
Index: third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h
diff --git a/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h b/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h
index e6fa7a25fd2aaf1667b8e882e3640b9d97261371..71a01ca6be45af94cc0e1c1e9fde8a8966647af0 100644
--- a/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h
+++ b/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.h
@@ -30,6 +30,9 @@
#include "public/platform/WebScrollbar.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
+#include "wtf/PtrUtil.h"
+
+#include <memory>
namespace blink {
@@ -39,8 +42,8 @@ class PLATFORM_EXPORT WebScrollbarImpl final : public WebScrollbar {
WTF_MAKE_NONCOPYABLE(WebScrollbarImpl);
public:
- static WebScrollbarImpl* create(Scrollbar* scrollbar) {
- return new WebScrollbarImpl(scrollbar);
+ static std::unique_ptr<WebScrollbarImpl> create(Scrollbar* scrollbar) {
+ return wrapUnique(new WebScrollbarImpl(scrollbar));
}
// Implement WebScrollbar methods

Powered by Google App Engine
This is Rietveld 408576698