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

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

Issue 1776993007: Rename Init.h to CoreInitializer.h, and InitModules.h to ModuleInitializer.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "InitModules.h"
6
7 #include "bindings/modules/v8/ModuleBindingsInitializer.h"
8 #include "core/EventTypeNames.h"
9 #include "core/dom/Document.h"
10 #include "core/html/HTMLCanvasElement.h"
11 #include "modules/EventModulesFactory.h"
12 #include "modules/EventModulesNames.h"
13 #include "modules/EventTargetModulesNames.h"
14 #include "modules/IndexedDBNames.h"
15 #include "modules/accessibility/AXObjectCacheImpl.h"
16 #include "modules/canvas2d/CanvasRenderingContext2D.h"
17 #include "modules/filesystem/DraggedIsolatedFileSystemImpl.h"
18 #include "modules/imagebitmap/ImageBitmapRenderingContext.h"
19 #include "modules/offscreencanvas/OffscreenCanvas.h"
20 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h"
21 #include "modules/webdatabase/DatabaseManager.h"
22 #include "modules/webgl/WebGL2RenderingContext.h"
23 #include "modules/webgl/WebGLRenderingContext.h"
24
25 namespace blink {
26
27 void ModulesInitializer::init()
28 {
29 ASSERT(!isInitialized());
30
31 // Strings must be initialized before calling CoreInitializer::init().
32 const unsigned modulesStaticStringsCount = EventNames::EventModulesNamesCoun t
33 + EventTargetNames::EventTargetModulesNamesCount
34 + IndexedDBNames::IndexedDBNamesCount;
35 StringImpl::reserveStaticStringsCapacityForSize(modulesStaticStringsCount);
36
37 EventNames::initModules();
38 EventTargetNames::initModules();
39 Document::registerEventFactory(EventModulesFactory::create());
40 ModuleBindingsInitializer::init();
41 IndexedDBNames::init();
42 AXObjectCache::init(AXObjectCacheImpl::create);
43 DraggedIsolatedFileSystem::init(DraggedIsolatedFileSystemImpl::prepareForDat aObject);
44
45 CoreInitializer::init();
46
47 // Canvas context types must be registered with the HTMLCanvasElement.
48 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new CanvasRender ingContext2D::Factory()));
49 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGLRenderi ngContext::Factory()));
50 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGL2Render ingContext::Factory()));
51 HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new ImageBitmapR enderingContext::Factory()));
52
53 // OffscreenCanvas context types must be registered with the OffscreenCanvas .
54 OffscreenCanvas::registerRenderingContextFactory(adoptPtr(new OffscreenCanva sRenderingContext2D::Factory()));
55
56 ASSERT(isInitialized());
57 }
58
59 void ModulesInitializer::shutdown()
60 {
61 ASSERT(isInitialized());
62 DatabaseManager::terminateDatabaseThread();
63 CoreInitializer::shutdown();
64
65 }
66
67 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/InitModules.h ('k') | third_party/WebKit/Source/modules/ModulesInitializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698