Call the vet - depending on what stage she is in regarding pregnancy, your vet can advise when it will be safe to worm mom and kittens.
Its not recommended that pregnant moms get wormed as it could cause deformed kittens or dead kittens. That's why they tell breeders if you need to worm your cats - do it BEFORE they are bred!
It doesn't really matter if she is inside now. The fact that she was outside before means that she is almost guaranteed to have worms.
Just get her to a vet and he/she will decide on what they will do about the worms. He will either wait until after she has her kittens or he will deworm her now. Either way it would be a good idea to get her to a vet.
There are too many risks, to worm her during pregnancy without your vets advice, depending on weight, how far along she is in pregnancy, and what type of worm, may depend on what he can treat her with. Please do not use Over The Counter (OTC) wormers, they can be dangerous.
Since she has been outdoors, I would have an ELISA test done for Felv/Fiv as well, to find out if her or the unborn kittens are at risk.
You mentioned her son had worms, so this is her 2nd litter? If you are not a registered breeder, I respectfully suggest spaying her, so that she does not continue going out and having more babies. Also may I suggest spaying and neutering the kittens prior to placing them in adopting homes. Accidents do happen, everyone can get busy and put off spay and neutering their pet, and a female can go into heat as early as 4 months.
If you have the male cat, he needs to be neutered, and kept away for at least 4-6 weeks, as they will continue to be able to breed successfully for a few weeks after a neuter, spay Mom first.