It used to be you had to go all the way to Las Vegas to play the slots. But soon, you may be able to gamble on your smartphone.

Thanks to improvements in technology, a change in federal rules and shifting political calculations, a push to legalize online and mobile gambling is picking up steam. Three states already have moved to allow it, and Silicon Valley tech companies, including San Francisco-based social gaming giant Zynga, are rushing to cash in.

"It's inevitable that this spreads pretty quickly," said Doug Walker, who studies casino gambling as a professor of economics at the College of Charleston in South Carolina.

Last month, the governors of New Jersey and Nevada signed laws to legalize online gambling in their states. And earlier this year, Delaware, which legalized online gambling last summer, solicited bids from companies to run the service that will oversee online gambling there.

Similar legalization proposals are being promoted in numerous other states, many of which are searching for new revenue to replace tax dollars wiped out by the Great Recession. In California, state Sen. Roderick Wright, D-Inglewood, has introduced a bill that would legalize all online gambling in the state, while state Sen. Lou Correa, D-Santa Ana, has proposed a bill that would legalize only online poker.

It's not just cash-strapped state governments that see a potential jackpot in