OLD | NEW |
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" |
11 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
12 #include "core/html/HTMLCanvasElement.h" | 12 #include "core/html/HTMLCanvasElement.h" |
13 #include "core/offscreencanvas/OffscreenCanvas.h" | 13 #include "core/offscreencanvas/OffscreenCanvas.h" |
14 #include "modules/EventModulesFactory.h" | 14 #include "modules/EventModulesFactory.h" |
15 #include "modules/EventModulesNames.h" | 15 #include "modules/EventModulesNames.h" |
16 #include "modules/EventTargetModulesNames.h" | 16 #include "modules/EventTargetModulesNames.h" |
17 #include "modules/IndexedDBNames.h" | 17 #include "modules/IndexedDBNames.h" |
18 #include "modules/accessibility/AXObjectCacheImpl.h" | 18 #include "modules/accessibility/AXObjectCacheImpl.h" |
19 #include "modules/app_banner/AppBannerController.h" | 19 #include "modules/app_banner/AppBannerController.h" |
20 #include "modules/canvas2d/CanvasRenderingContext2D.h" | 20 #include "modules/canvas2d/CanvasRenderingContext2D.h" |
21 #include "modules/compositorworker/CompositorWorkerThread.h" | 21 #include "modules/compositorworker/CompositorWorkerThread.h" |
22 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" | 22 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" |
23 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" | 23 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" |
24 #include "modules/imagebitmap/ImageBitmapRenderingContext.h" | 24 #include "modules/imagebitmap/ImageBitmapRenderingContext.h" |
25 #include "modules/installation/InstallationServiceImpl.h" | 25 #include "modules/installation/InstallationServiceImpl.h" |
26 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" | 26 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" |
27 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" | 27 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" |
| 28 #include "modules/wasm/WasmResponseExtensions.h" |
28 #include "modules/webdatabase/DatabaseManager.h" | 29 #include "modules/webdatabase/DatabaseManager.h" |
29 #include "modules/webgl/WebGL2RenderingContext.h" | 30 #include "modules/webgl/WebGL2RenderingContext.h" |
30 #include "modules/webgl/WebGLRenderingContext.h" | 31 #include "modules/webgl/WebGLRenderingContext.h" |
31 #include "platform/mojo/MojoHelper.h" | 32 #include "platform/mojo/MojoHelper.h" |
32 #include "public/platform/InterfaceRegistry.h" | 33 #include "public/platform/InterfaceRegistry.h" |
33 #include "wtf/PtrUtil.h" | 34 #include "wtf/PtrUtil.h" |
34 | 35 |
35 namespace blink { | 36 namespace blink { |
36 | 37 |
37 void ModulesInitializer::initialize() { | 38 void ModulesInitializer::initialize() { |
(...skipping 16 matching lines...) Expand all Loading... |
54 DraggedIsolatedFileSystemImpl::prepareForDataObject); | 55 DraggedIsolatedFileSystemImpl::prepareForDataObject); |
55 CSSPaintImageGenerator::init(CSSPaintImageGeneratorImpl::create); | 56 CSSPaintImageGenerator::init(CSSPaintImageGeneratorImpl::create); |
56 // Some unit tests may have no message loop ready, so we can't initialize the | 57 // Some unit tests may have no message loop ready, so we can't initialize the |
57 // mojo stuff here. They can initialize those mojo stuff they're interested in | 58 // mojo stuff here. They can initialize those mojo stuff they're interested in |
58 // later after they got a message loop ready. | 59 // later after they got a message loop ready. |
59 if (canInitializeMojo()) | 60 if (canInitializeMojo()) |
60 TimeZoneMonitorClient::Init(); | 61 TimeZoneMonitorClient::Init(); |
61 | 62 |
62 CoreInitializer::initialize(); | 63 CoreInitializer::initialize(); |
63 | 64 |
| 65 WasmResponseExtensions::initialize(V8PerIsolateData::mainThreadIsolate()); |
| 66 |
64 // Canvas context types must be registered with the HTMLCanvasElement. | 67 // Canvas context types must be registered with the HTMLCanvasElement. |
65 HTMLCanvasElement::registerRenderingContextFactory( | 68 HTMLCanvasElement::registerRenderingContextFactory( |
66 WTF::makeUnique<CanvasRenderingContext2D::Factory>()); | 69 WTF::makeUnique<CanvasRenderingContext2D::Factory>()); |
67 HTMLCanvasElement::registerRenderingContextFactory( | 70 HTMLCanvasElement::registerRenderingContextFactory( |
68 WTF::makeUnique<WebGLRenderingContext::Factory>()); | 71 WTF::makeUnique<WebGLRenderingContext::Factory>()); |
69 HTMLCanvasElement::registerRenderingContextFactory( | 72 HTMLCanvasElement::registerRenderingContextFactory( |
70 WTF::makeUnique<WebGL2RenderingContext::Factory>()); | 73 WTF::makeUnique<WebGL2RenderingContext::Factory>()); |
71 HTMLCanvasElement::registerRenderingContextFactory( | 74 HTMLCanvasElement::registerRenderingContextFactory( |
72 WTF::makeUnique<ImageBitmapRenderingContext::Factory>()); | 75 WTF::makeUnique<ImageBitmapRenderingContext::Factory>()); |
73 | 76 |
(...skipping 12 matching lines...) Expand all Loading... |
86 // TODO(dominickn): This interface should be document-scoped rather than | 89 // TODO(dominickn): This interface should be document-scoped rather than |
87 // frame-scoped, as the resulting banner event is dispatched to | 90 // frame-scoped, as the resulting banner event is dispatched to |
88 // frame()->document(). | 91 // frame()->document(). |
89 frame->interfaceRegistry()->addInterface(WTF::bind( | 92 frame->interfaceRegistry()->addInterface(WTF::bind( |
90 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame))); | 93 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame))); |
91 }); | 94 }); |
92 ASSERT(isInitialized()); | 95 ASSERT(isInitialized()); |
93 } | 96 } |
94 | 97 |
95 } // namespace blink | 98 } // namespace blink |
OLD | NEW |