no class handles that, it's a property file
Isn't there some logic involved to determine this?
In the identity admin portlet window you can set a default theme for a User. You can also set a default theme and layout for a page and a default theme and layout for an entire portal.
It seems like there would be some class that handles determining which theme and layout to display.