| 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/html/HTMLCanvasElement.h" | 11 #include "core/html/HTMLCanvasElement.h" |
| 12 #include "core/offscreencanvas/OffscreenCanvas.h" | 12 #include "core/offscreencanvas/OffscreenCanvas.h" |
| 13 #include "modules/EventModulesFactory.h" | 13 #include "modules/EventModulesFactory.h" |
| 14 #include "modules/EventModulesNames.h" | 14 #include "modules/EventModulesNames.h" |
| 15 #include "modules/EventTargetModulesNames.h" | 15 #include "modules/EventTargetModulesNames.h" |
| 16 #include "modules/IndexedDBNames.h" | 16 #include "modules/IndexedDBNames.h" |
| 17 #include "modules/accessibility/AXObjectCacheImpl.h" | 17 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 18 #include "modules/accessibility/AXUtilsImpl.h" |
| 18 #include "modules/canvas2d/CanvasRenderingContext2D.h" | 19 #include "modules/canvas2d/CanvasRenderingContext2D.h" |
| 19 #include "modules/compositorworker/CompositorWorkerThread.h" | 20 #include "modules/compositorworker/CompositorWorkerThread.h" |
| 20 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" | 21 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" |
| 21 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" | 22 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" |
| 22 #include "modules/imagebitmap/ImageBitmapRenderingContext.h" | 23 #include "modules/imagebitmap/ImageBitmapRenderingContext.h" |
| 23 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" | 24 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" |
| 24 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" | 25 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" |
| 25 #include "modules/webdatabase/DatabaseManager.h" | 26 #include "modules/webdatabase/DatabaseManager.h" |
| 26 #include "modules/webgl/WebGL2RenderingContext.h" | 27 #include "modules/webgl/WebGL2RenderingContext.h" |
| 27 #include "modules/webgl/WebGLRenderingContext.h" | 28 #include "modules/webgl/WebGLRenderingContext.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 39 EventTargetNames::EventTargetModulesNamesCount + | 40 EventTargetNames::EventTargetModulesNamesCount + |
| 40 IndexedDBNames::IndexedDBNamesCount; | 41 IndexedDBNames::IndexedDBNamesCount; |
| 41 StringImpl::reserveStaticStringsCapacityForSize(modulesStaticStringsCount); | 42 StringImpl::reserveStaticStringsCapacityForSize(modulesStaticStringsCount); |
| 42 | 43 |
| 43 EventNames::initModules(); | 44 EventNames::initModules(); |
| 44 EventTargetNames::initModules(); | 45 EventTargetNames::initModules(); |
| 45 Document::registerEventFactory(EventModulesFactory::create()); | 46 Document::registerEventFactory(EventModulesFactory::create()); |
| 46 ModuleBindingsInitializer::init(); | 47 ModuleBindingsInitializer::init(); |
| 47 IndexedDBNames::init(); | 48 IndexedDBNames::init(); |
| 48 AXObjectCache::init(AXObjectCacheImpl::create); | 49 AXObjectCache::init(AXObjectCacheImpl::create); |
| 50 AXUtils::setInstance(new AXUtilsImpl()); |
| 49 DraggedIsolatedFileSystem::init( | 51 DraggedIsolatedFileSystem::init( |
| 50 DraggedIsolatedFileSystemImpl::prepareForDataObject); | 52 DraggedIsolatedFileSystemImpl::prepareForDataObject); |
| 51 CSSPaintImageGenerator::init(CSSPaintImageGeneratorImpl::create); | 53 CSSPaintImageGenerator::init(CSSPaintImageGeneratorImpl::create); |
| 52 // Some unit tests may have no message loop ready, so we can't initialize the | 54 // 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 | 55 // mojo stuff here. They can initialize those mojo stuff they're interested in |
| 54 // later after they got a message loop ready. | 56 // later after they got a message loop ready. |
| 55 if (canInitializeMojo()) | 57 if (canInitializeMojo()) |
| 56 TimeZoneMonitorClient::Init(); | 58 TimeZoneMonitorClient::Init(); |
| 57 | 59 |
| 58 CoreInitializer::initialize(); | 60 CoreInitializer::initialize(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 72 WTF::makeUnique<OffscreenCanvasRenderingContext2D::Factory>()); | 74 WTF::makeUnique<OffscreenCanvasRenderingContext2D::Factory>()); |
| 73 OffscreenCanvas::registerRenderingContextFactory( | 75 OffscreenCanvas::registerRenderingContextFactory( |
| 74 WTF::makeUnique<WebGLRenderingContext::Factory>()); | 76 WTF::makeUnique<WebGLRenderingContext::Factory>()); |
| 75 OffscreenCanvas::registerRenderingContextFactory( | 77 OffscreenCanvas::registerRenderingContextFactory( |
| 76 WTF::makeUnique<WebGL2RenderingContext::Factory>()); | 78 WTF::makeUnique<WebGL2RenderingContext::Factory>()); |
| 77 | 79 |
| 78 ASSERT(isInitialized()); | 80 ASSERT(isInitialized()); |
| 79 } | 81 } |
| 80 | 82 |
| 81 } // namespace blink | 83 } // namespace blink |
| OLD | NEW |