Chromium Code Reviews| 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 "bindings/modules/v8/TransferablesForModules.h" | |
| 8 #include "core/EventTypeNames.h" | 9 #include "core/EventTypeNames.h" |
| 9 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| 10 #include "core/html/HTMLCanvasElement.h" | 11 #include "core/html/HTMLCanvasElement.h" |
| 11 #include "modules/EventModulesFactory.h" | 12 #include "modules/EventModulesFactory.h" |
| 12 #include "modules/EventModulesNames.h" | 13 #include "modules/EventModulesNames.h" |
| 13 #include "modules/EventTargetModulesNames.h" | 14 #include "modules/EventTargetModulesNames.h" |
| 14 #include "modules/IndexedDBNames.h" | 15 #include "modules/IndexedDBNames.h" |
| 15 #include "modules/accessibility/AXObjectCacheImpl.h" | 16 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 16 #include "modules/canvas2d/CanvasRenderingContext2D.h" | 17 #include "modules/canvas2d/CanvasRenderingContext2D.h" |
| 17 #include "modules/compositorworker/CompositorWorkerThread.h" | 18 #include "modules/compositorworker/CompositorWorkerThread.h" |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 47 | 48 |
| 48 // Canvas context types must be registered with the HTMLCanvasElement. | 49 // Canvas context types must be registered with the HTMLCanvasElement. |
| 49 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new CanvasRender ingContext2D::Factory())); | 50 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new CanvasRender ingContext2D::Factory())); |
| 50 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGLRenderi ngContext::Factory())); | 51 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGLRenderi ngContext::Factory())); |
| 51 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGL2Render ingContext::Factory())); | 52 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGL2Render ingContext::Factory())); |
| 52 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new ImageBitmapR enderingContext::Factory())); | 53 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new ImageBitmapR enderingContext::Factory())); |
| 53 | 54 |
| 54 // OffscreenCanvas context types must be registered with the OffscreenCanvas . | 55 // OffscreenCanvas context types must be registered with the OffscreenCanvas . |
| 55 OffscreenCanvas::registerRenderingContextFactory(adoptPtr(new OffscreenCanva sRenderingContext2D::Factory())); | 56 OffscreenCanvas::registerRenderingContextFactory(adoptPtr(new OffscreenCanva sRenderingContext2D::Factory())); |
| 56 | 57 |
| 58 Transferables::registerFactory([]() -> Transferables* { | |
|
haraken
2016/04/21 00:29:03
Move this method into ModuleBindingsInitializer::i
xidachen
2016/04/21 15:32:48
Done.
| |
| 59 return new TransferablesForModules; | |
| 60 }); | |
| 61 | |
| 57 ASSERT(isInitialized()); | 62 ASSERT(isInitialized()); |
| 58 } | 63 } |
| 59 | 64 |
| 60 void ModulesInitializer::shutdown() | 65 void ModulesInitializer::shutdown() |
| 61 { | 66 { |
| 62 ASSERT(isInitialized()); | 67 ASSERT(isInitialized()); |
| 63 DatabaseManager::terminateDatabaseThread(); | 68 DatabaseManager::terminateDatabaseThread(); |
| 64 CompositorWorkerThread::clearSharedBackingThread(); | 69 CompositorWorkerThread::clearSharedBackingThread(); |
| 65 CoreInitializer::shutdown(); | 70 CoreInitializer::shutdown(); |
| 66 } | 71 } |
| 67 | 72 |
| 68 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |