Identifying a USB charging port without enumeration
Although I don't have direct experience with this, from what I've read, IC's that perform this function usually sample the D+/D- lines on application of power with some sink on the D+/D- to detect the charger type, and disconnect their detection logic once a determination has been made of the connected source, AC adapter or USB port.  More information is available from a TI app note here.

I sure from my previous part searches that some battery charger IC's have built in charger type detection, but I couldn't find an example part when searching just now.

There's the MAX14578 which also does the job, but it may not fit your criteria of low cost.