I don't think the U.S. could have taken all of Mexico in the Mexican-American War.
However, is it possible the U.S. could have taken more than it did OTL (Baja California, Sonora, and Chihuahua)? What would have needed to change (militarily or politically) for that to happen?