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/document_metadata/CopylessPasteServer.h" |
23 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" | 24 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h" |
24 #include "modules/imagebitmap/ImageBitmapRenderingContext.h" | 25 #include "modules/imagebitmap/ImageBitmapRenderingContext.h" |
25 #include "modules/installation/InstallationServiceImpl.h" | 26 #include "modules/installation/InstallationServiceImpl.h" |
26 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" | 27 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" |
27 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" | 28 #include "modules/time_zone_monitor/TimeZoneMonitorClient.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" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // OffscreenCanvas context types must be registered with the OffscreenCanvas. | 75 // OffscreenCanvas context types must be registered with the OffscreenCanvas. |
75 OffscreenCanvas::registerRenderingContextFactory( | 76 OffscreenCanvas::registerRenderingContextFactory( |
76 WTF::makeUnique<OffscreenCanvasRenderingContext2D::Factory>()); | 77 WTF::makeUnique<OffscreenCanvasRenderingContext2D::Factory>()); |
77 OffscreenCanvas::registerRenderingContextFactory( | 78 OffscreenCanvas::registerRenderingContextFactory( |
78 WTF::makeUnique<WebGLRenderingContext::Factory>()); | 79 WTF::makeUnique<WebGLRenderingContext::Factory>()); |
79 OffscreenCanvas::registerRenderingContextFactory( | 80 OffscreenCanvas::registerRenderingContextFactory( |
80 WTF::makeUnique<WebGL2RenderingContext::Factory>()); | 81 WTF::makeUnique<WebGL2RenderingContext::Factory>()); |
81 | 82 |
82 // Mojo Interfaces registered with LocalFrame | 83 // Mojo Interfaces registered with LocalFrame |
83 LocalFrame::registerInitializationCallback([](LocalFrame* frame) { | 84 LocalFrame::registerInitializationCallback([](LocalFrame* frame) { |
| 85 frame->interfaceRegistry()->addInterface(WTF::bind( |
| 86 &CopylessPasteServer::bindMojoRequest, wrapWeakPersistent(frame))); |
84 frame->interfaceRegistry()->addInterface( | 87 frame->interfaceRegistry()->addInterface( |
85 WTF::bind(&InstallationServiceImpl::create, wrapWeakPersistent(frame))); | 88 WTF::bind(&InstallationServiceImpl::create, wrapWeakPersistent(frame))); |
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 |