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

Side by Side Diff: third_party/WebKit/Source/modules/ModulesInitializer.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ModulesInitializer.h" 5 #include "ModulesInitializer.h"
6 6
7 #include "bindings/modules/v8/ModuleBindingsInitializer.h" 7 #include "bindings/modules/v8/ModuleBindingsInitializer.h"
8 #include "core/EventTypeNames.h" 8 #include "core/EventTypeNames.h"
9 #include "core/css/CSSPaintImageGenerator.h" 9 #include "core/css/CSSPaintImageGenerator.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Some unit tests may have no message loop ready, so we can't initialize the 52 // Some unit tests may have no message loop ready, so we can't initialize the
53 // mojo stuff here. They can initialize those mojo stuff they're interested in 53 // mojo stuff here. They can initialize those mojo stuff they're interested in
54 // later after they got a message loop ready. 54 // later after they got a message loop ready.
55 if (canInitializeMojo()) 55 if (canInitializeMojo())
56 TimeZoneMonitorClient::Init(); 56 TimeZoneMonitorClient::Init();
57 57
58 CoreInitializer::initialize(); 58 CoreInitializer::initialize();
59 59
60 // Canvas context types must be registered with the HTMLCanvasElement. 60 // Canvas context types must be registered with the HTMLCanvasElement.
61 HTMLCanvasElement::registerRenderingContextFactory( 61 HTMLCanvasElement::registerRenderingContextFactory(
62 wrapUnique(new CanvasRenderingContext2D::Factory())); 62 makeUnique<CanvasRenderingContext2D::Factory>());
63 HTMLCanvasElement::registerRenderingContextFactory( 63 HTMLCanvasElement::registerRenderingContextFactory(
64 wrapUnique(new WebGLRenderingContext::Factory())); 64 makeUnique<WebGLRenderingContext::Factory>());
65 HTMLCanvasElement::registerRenderingContextFactory( 65 HTMLCanvasElement::registerRenderingContextFactory(
66 wrapUnique(new WebGL2RenderingContext::Factory())); 66 makeUnique<WebGL2RenderingContext::Factory>());
67 HTMLCanvasElement::registerRenderingContextFactory( 67 HTMLCanvasElement::registerRenderingContextFactory(
68 wrapUnique(new ImageBitmapRenderingContext::Factory())); 68 makeUnique<ImageBitmapRenderingContext::Factory>());
69 69
70 // OffscreenCanvas context types must be registered with the OffscreenCanvas. 70 // OffscreenCanvas context types must be registered with the OffscreenCanvas.
71 OffscreenCanvas::registerRenderingContextFactory( 71 OffscreenCanvas::registerRenderingContextFactory(
72 wrapUnique(new OffscreenCanvasRenderingContext2D::Factory())); 72 makeUnique<OffscreenCanvasRenderingContext2D::Factory>());
73 OffscreenCanvas::registerRenderingContextFactory( 73 OffscreenCanvas::registerRenderingContextFactory(
74 wrapUnique(new WebGLRenderingContext::Factory())); 74 makeUnique<WebGLRenderingContext::Factory>());
75 75
76 ASSERT(isInitialized()); 76 ASSERT(isInitialized());
77 } 77 }
78 78
79 void ModulesInitializer::shutdown() { 79 void ModulesInitializer::shutdown() {
80 ASSERT(isInitialized()); 80 ASSERT(isInitialized());
81 DatabaseManager::terminateDatabaseThread(); 81 DatabaseManager::terminateDatabaseThread();
82 CoreInitializer::shutdown(); 82 CoreInitializer::shutdown();
83 CompositorWorkerThread::clearSharedBackingThread(); 83 CompositorWorkerThread::clearSharedBackingThread();
84 } 84 }
85 85
86 } // namespace blink 86 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698