Exemplo n.º 1
0
PermissionStatus* PermissionStatus::createAndListen(
    ExecutionContext* executionContext,
    MojoPermissionStatus status,
    MojoPermissionDescriptor descriptor) {
  PermissionStatus* permissionStatus =
      new PermissionStatus(executionContext, status, std::move(descriptor));
  permissionStatus->suspendIfNeeded();
  permissionStatus->startListening();
  return permissionStatus;
}
PermissionStatus* PermissionStatus::create(ExecutionContext* executionContext, WebPermissionStatus status, WebPermissionType type)
{
    PermissionStatus* permissionStatus = new PermissionStatus(executionContext, status, type);
    permissionStatus->suspendIfNeeded();
    return permissionStatus;
}