This is the "incorporation" question, and it's raised in Nordyke v. King, a case now pending before the Ninth Circuit; the pro-incorporation and the anti-incorporation briefs are now both available.
Note, though, that the issue in this case relates only to a ban on possession on government-owned nonresidential property: Alameda County banned firearms possession in county-owned "parks, recreational areas, historic sites, parking lots of public buildings (the State prohibits gun possession within the same buildings), and the County fairgrounds." The Ninth Circuit might well conclude that it need not decide whether the Second Amendment is incorporated, because even if it is incorporated it doesn't apply to the government's restrictions on the use of its own nonresidential property.
I'm not sure whether such a result would be right or wrong, but I want to flag the possibility that the Circuit will reach it. The First and Fourth Amendments often (though not always) apply differently to the government as proprietor than to the government as regulator of what happens on private property; likewise as to the right to an abortion; the circuit may well hold that the Second Amendment does so, too, and that it gives the government broad authority to control gun possession.
Note, by the way, that it's also possible that there may be a right to possess a gun in self-defense on government property, but no right to possess a gun for purpose of selling it. (The right to keep and bear arms necessarily includes the right not to have the government stop everyone from selling you such guns, just as the right to use contraceptives includes the right not to have the government stop the sales of contraceptives. But it need not include the right to buy a gun on government property, just as the right to have an abortion does not include the right to get an abortion in a county-owned hospital.)