Exemplo n.º 1
0
void ChromeClientImpl::installSupplements(LocalFrame& frame) {
  WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(&frame);
  WebFrameClient* client = webFrame->client();
  DCHECK(client);
  providePushControllerTo(frame, client->pushClient());
  provideUserMediaTo(frame,
                     UserMediaClientImpl::create(client->userMediaClient()));
  provideIndexedDBClientTo(frame, IndexedDBClientImpl::create());
  provideLocalFileSystemTo(frame, LocalFileSystemClient::create());
  provideNavigatorContentUtilsTo(
      frame, NavigatorContentUtilsClientImpl::create(webFrame));

  if (RuntimeEnabledFeatures::webBluetoothEnabled())
    BluetoothSupplement::provideTo(frame, client->bluetooth());

  ScreenOrientationController::provideTo(frame,
                                         client->webScreenOrientationClient());
  if (RuntimeEnabledFeatures::presentationEnabled())
    PresentationController::provideTo(frame, client->presentationClient());
  if (RuntimeEnabledFeatures::audioOutputDevicesEnabled())
    provideAudioOutputDeviceClientTo(frame,
                                     AudioOutputDeviceClientImpl::create());
  if (RuntimeEnabledFeatures::installedAppEnabled())
    InstalledAppController::provideTo(frame, client->installedAppClient());
}