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

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

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Uploading the latest version from my repo so I can reference it Created 3 years, 8 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
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"
(...skipping 14 matching lines...) Expand all
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/webdatabase/DatabaseManager.h" 28 #include "modules/webdatabase/DatabaseManager.h"
29 #include "modules/webgl/WebGL2RenderingContext.h" 29 #include "modules/webgl/WebGL2RenderingContext.h"
30 #include "modules/webgl/WebGLRenderingContext.h" 30 #include "modules/webgl/WebGLRenderingContext.h"
31 #include "platform/mojo/MojoHelper.h" 31 #include "platform/mojo/MojoHelper.h"
32 #include "public/platform/InterfaceRegistry.h" 32 #include "public/platform/InterfaceRegistry.h"
33 #include "wtf/PtrUtil.h" 33 #include "wtf/PtrUtil.h"
34 34
35 #if defined(OS_ANDROID)
36 #include "core/editing/TextSuggestionBackendImplAndroid.h"
37 #endif
38
35 namespace blink { 39 namespace blink {
36 40
37 void ModulesInitializer::initialize() { 41 void ModulesInitializer::initialize() {
38 ASSERT(!isInitialized()); 42 ASSERT(!isInitialized());
39 43
40 // Strings must be initialized before calling CoreInitializer::init(). 44 // Strings must be initialized before calling CoreInitializer::init().
41 const unsigned modulesStaticStringsCount = 45 const unsigned modulesStaticStringsCount =
42 EventNames::EventModulesNamesCount + 46 EventNames::EventModulesNamesCount +
43 EventTargetNames::EventTargetModulesNamesCount + 47 EventTargetNames::EventTargetModulesNamesCount +
44 IndexedDBNames::IndexedDBNamesCount; 48 IndexedDBNames::IndexedDBNamesCount;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 85
82 // Mojo Interfaces registered with LocalFrame 86 // Mojo Interfaces registered with LocalFrame
83 LocalFrame::registerInitializationCallback([](LocalFrame* frame) { 87 LocalFrame::registerInitializationCallback([](LocalFrame* frame) {
84 frame->interfaceRegistry()->addInterface( 88 frame->interfaceRegistry()->addInterface(
85 WTF::bind(&InstallationServiceImpl::create, wrapWeakPersistent(frame))); 89 WTF::bind(&InstallationServiceImpl::create, wrapWeakPersistent(frame)));
86 // TODO(dominickn): This interface should be document-scoped rather than 90 // TODO(dominickn): This interface should be document-scoped rather than
87 // frame-scoped, as the resulting banner event is dispatched to 91 // frame-scoped, as the resulting banner event is dispatched to
88 // frame()->document(). 92 // frame()->document().
89 frame->interfaceRegistry()->addInterface(WTF::bind( 93 frame->interfaceRegistry()->addInterface(WTF::bind(
90 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame))); 94 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame)));
95
96 #if defined(OS_ANDROID)
97 frame->interfaceRegistry()->addInterface(WTF::bind(
98 &TextSuggestionBackendImplAndroid::create, wrapWeakPersistent(frame)));
99 #endif
91 }); 100 });
92 ASSERT(isInitialized()); 101 ASSERT(isInitialized());
93 } 102 }
94 103
95 } // namespace blink 104 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698