Neither the frame nor the components drive the chainline individually. Rather it's a combination of the two.
Let's assume for one second that there was only one type of frame. That is: bottom bracket shells are all the same and rear triangle spacing is all the same. That's not true at all, but let's pretend for just one second...
If that were the case, a crankset that were slightly wider than other cranksets would pull the chaineline outward in the front and a narrower crankset would pull the chainline inward in the front. (Essentially the width of a cranskset is a function of the bottom bracket and the spindle, but when you throw in different manfuacturers it gets messy.) The same would be true of the rear hub. A narrower hub would pull the chainline inward in the rear while a wider hub would push it outward.
Now, as I indicated previously, frames are not all the same. On the flipside of that, let's forget everything I previously said and pretend for a minute that all frames are the same and all hubs and all bottom brackets are different.
Conversely to our previous make-believe world, a wider bottom bracket shell would pull the chainline outward in the front and a wider rear triangle spacing would do so in the rear. It should be obvious at this point that either one of these things would have to be compensated for by wider corresponding componentry.
So, to reiterate the answer to your specific question: Neither the frame nor the components drive the chainline. Rather, it is a combination of the two.
Whether or not proper chaineline can be achieved through spacing out the rear axle depends at least partly on the frame material. I.e, steel can be spaced out more than aluminum and carbon. More specifically, carbon can't be spaced out at all and spacing out aluminum isn't recommended (although I've heard second and third hand of people making it work, no personal experience though). However, if your frame spacing is too wide, you can always add spacers to the hub/axle.
To answer the question that I think you mean to ask: you can almost always (especially on a geared bike) achieve proper (or at least acceptable) chainline, either through spacers in the crankset/bottom bracket or spacers in the hub/cassette.
Where you decide to put the spacers is ultimately a product of your specific frame/component combination.