Presidential Primaries go back to the very begining of the 20th century. Oregon had the first Primary in which voters chose WHICH candidate they wanted in 1910. The smoke-filled room generally mean that the campaign managers for the leading candidates would try to win the support of lesser candidates delegates in order to win the nomination. Let's say you are at the 2004 Democratic Convention and no one candidate gets the required majority of votes even after several rounds of voting. For our purposes let's say that Dean has 40% of the vote (ie delegates) and Clark has 35%, Kerry has 10%, Edwards 9% and Sharpton 6%. Clark and Dean would each try to convince the other candidates to throw support to their candidacy. The "smoke-filled" room is actually those meetings where the various party leaders would try to win support from the other candidates, maybe promising a position in a new administration, or promising support for a pet issue.
The most famous "smoke filled room" was at the 1920 republican convention when party leaders chose a compromise candidate, Warren Harding, when the leading candiates found themselves in a stalemate. The equivalent for our example would be the DLC and the DNC and various Congressional leaders such as Dashle, throwing their support behind Kerry if it appeared that neither Dean nor Clark would get the required majority of votes.
You can find some history of primaries at..
http://gi.grolier.com/presidents/ea/side/primary.html