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

Unified Diff: third_party/WebKit/Source/modules/ModulesInitializer.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. 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/modules/ModulesInitializer.cpp
diff --git a/third_party/WebKit/Source/modules/ModulesInitializer.cpp b/third_party/WebKit/Source/modules/ModulesInitializer.cpp
index 7aabb48cfd4a6e66fca3927fcb7b149b312c6e20..29999f16dfbbe03f42f6056699ad4952c3c2daf5 100644
--- a/third_party/WebKit/Source/modules/ModulesInitializer.cpp
+++ b/third_party/WebKit/Source/modules/ModulesInitializer.cpp
@@ -24,6 +24,7 @@
#include "modules/webdatabase/DatabaseManager.h"
#include "modules/webgl/WebGL2RenderingContext.h"
#include "modules/webgl/WebGLRenderingContext.h"
+#include "wtf/PtrUtil.h"
namespace blink {
@@ -49,14 +50,14 @@ void ModulesInitializer::initialize()
CoreInitializer::initialize();
// Canvas context types must be registered with the HTMLCanvasElement.
- HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new CanvasRenderingContext2D::Factory()));
- HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGLRenderingContext::Factory()));
- HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGL2RenderingContext::Factory()));
- HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new ImageBitmapRenderingContext::Factory()));
+ HTMLCanvasElement::registerRenderingContextFactory(wrapUnique(new CanvasRenderingContext2D::Factory()));
+ HTMLCanvasElement::registerRenderingContextFactory(wrapUnique(new WebGLRenderingContext::Factory()));
+ HTMLCanvasElement::registerRenderingContextFactory(wrapUnique(new WebGL2RenderingContext::Factory()));
+ HTMLCanvasElement::registerRenderingContextFactory(wrapUnique(new ImageBitmapRenderingContext::Factory()));
// OffscreenCanvas context types must be registered with the OffscreenCanvas.
- OffscreenCanvas::registerRenderingContextFactory(adoptPtr(new OffscreenCanvasRenderingContext2D::Factory()));
- OffscreenCanvas::registerRenderingContextFactory(adoptPtr(new WebGLRenderingContext::Factory()));
+ OffscreenCanvas::registerRenderingContextFactory(wrapUnique(new OffscreenCanvasRenderingContext2D::Factory()));
+ OffscreenCanvas::registerRenderingContextFactory(wrapUnique(new WebGLRenderingContext::Factory()));
ASSERT(isInitialized());
}

Powered by Google App Engine
This is Rietveld 408576698