Refactored loadContentInBrowser's background job and ui thread task.