Parts are in Objective-C delegate, and other parts are in ResourceHandle class for no good reason.
Created attachment 194292 [details] proposed patch
Committed <http://trac.webkit.org/changeset/146488>.