| 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/editing/suggestion/TextSuggestionBackendImpl.h" |
| 11 #include "core/exported/WebSharedWorkerImpl.h" | 12 #include "core/exported/WebSharedWorkerImpl.h" |
| 12 #include "core/frame/LocalFrame.h" | 13 #include "core/frame/LocalFrame.h" |
| 13 #include "core/frame/Settings.h" | 14 #include "core/frame/Settings.h" |
| 14 #include "core/frame/WebLocalFrameBase.h" | 15 #include "core/frame/WebLocalFrameBase.h" |
| 15 #include "core/html/HTMLCanvasElement.h" | 16 #include "core/html/HTMLCanvasElement.h" |
| 16 #include "core/html/HTMLMediaElement.h" | 17 #include "core/html/HTMLMediaElement.h" |
| 17 #include "core/inspector/InspectorSession.h" | 18 #include "core/inspector/InspectorSession.h" |
| 18 #include "core/offscreencanvas/OffscreenCanvas.h" | 19 #include "core/offscreencanvas/OffscreenCanvas.h" |
| 19 #include "core/origin_trials/OriginTrials.h" | 20 #include "core/origin_trials/OriginTrials.h" |
| 20 #include "core/page/ChromeClient.h" | 21 #include "core/page/ChromeClient.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 frame.GetInterfaceRegistry()->AddInterface(WTF::Bind( | 131 frame.GetInterfaceRegistry()->AddInterface(WTF::Bind( |
| 131 &CopylessPasteServer::BindMojoRequest, WrapWeakPersistent(&frame))); | 132 &CopylessPasteServer::BindMojoRequest, WrapWeakPersistent(&frame))); |
| 132 } | 133 } |
| 133 frame.GetInterfaceRegistry()->AddInterface( | 134 frame.GetInterfaceRegistry()->AddInterface( |
| 134 WTF::Bind(&InstallationServiceImpl::Create, WrapWeakPersistent(&frame))); | 135 WTF::Bind(&InstallationServiceImpl::Create, WrapWeakPersistent(&frame))); |
| 135 // TODO(dominickn): This interface should be document-scoped rather than | 136 // TODO(dominickn): This interface should be document-scoped rather than |
| 136 // frame-scoped, as the resulting banner event is dispatched to | 137 // frame-scoped, as the resulting banner event is dispatched to |
| 137 // frame()->document(). | 138 // frame()->document(). |
| 138 frame.GetInterfaceRegistry()->AddInterface(WTF::Bind( | 139 frame.GetInterfaceRegistry()->AddInterface(WTF::Bind( |
| 139 &AppBannerController::BindMojoRequest, WrapWeakPersistent(&frame))); | 140 &AppBannerController::BindMojoRequest, WrapWeakPersistent(&frame))); |
| 141 frame.GetInterfaceRegistry()->AddInterface(WTF::Bind( |
| 142 &TextSuggestionBackendImpl::Create, WrapWeakPersistent(&frame))); |
| 140 } | 143 } |
| 141 | 144 |
| 142 void ModulesInitializer::InstallSupplements(LocalFrame& frame) const { | 145 void ModulesInitializer::InstallSupplements(LocalFrame& frame) const { |
| 143 WebLocalFrameBase* web_frame = WebLocalFrameBase::FromFrame(&frame); | 146 WebLocalFrameBase* web_frame = WebLocalFrameBase::FromFrame(&frame); |
| 144 WebFrameClient* client = web_frame->Client(); | 147 WebFrameClient* client = web_frame->Client(); |
| 145 DCHECK(client); | 148 DCHECK(client); |
| 146 ProvidePushControllerTo(frame, client->PushClient()); | 149 ProvidePushControllerTo(frame, client->PushClient()); |
| 147 ProvideUserMediaTo(frame, | 150 ProvideUserMediaTo(frame, |
| 148 UserMediaClientImpl::Create(client->UserMediaClient())); | 151 UserMediaClientImpl::Create(client->UserMediaClient())); |
| 149 ProvideIndexedDBClientTo(frame, IndexedDBClientImpl::Create(frame)); | 152 ProvideIndexedDBClientTo(frame, IndexedDBClientImpl::Create(frame)); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 source, media_player_client, &encrypted_media, | 238 source, media_player_client, &encrypted_media, |
| 236 encrypted_media.ContentDecryptionModule(), sink_id)); | 239 encrypted_media.ContentDecryptionModule(), sink_id)); |
| 237 } | 240 } |
| 238 | 241 |
| 239 WebRemotePlaybackClient* ModulesInitializer::CreateWebRemotePlaybackClient( | 242 WebRemotePlaybackClient* ModulesInitializer::CreateWebRemotePlaybackClient( |
| 240 HTMLMediaElement& html_media_element) { | 243 HTMLMediaElement& html_media_element) { |
| 241 return HTMLMediaElementRemotePlayback::remote(html_media_element); | 244 return HTMLMediaElementRemotePlayback::remote(html_media_element); |
| 242 } | 245 } |
| 243 | 246 |
| 244 } // namespace blink | 247 } // namespace blink |
| OLD | NEW |