2010-07-26  Tony Gentilcore  <tonyg@chromium.org>

        Reviewed by Darin Fisher.

        Move DocumentLoadTiming struct to a new file
        https://bugs.webkit.org/show_bug.cgi?id=42917

        Also makes DocumentLoadTiming Noncopyable.

        No new tests because no new functionality.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/DocumentLoadTiming.h: Added.
        (WebCore::DocumentLoadTiming::DocumentLoadTiming):
        * loader/DocumentLoader.h:
        * loader/FrameLoader.cpp:
        * loader/FrameLoaderTypes.h:
        * loader/MainResourceLoader.cpp:
        * page/Timing.cpp:

git-svn-id: svn://svn.chromium.org/blink/trunk@64051 bbb929c8-8fbe-4397-9dbb-9b2b20218538
void MainResourceLoader::setDefersLoading(bool defers)
{
    ResourceLoader::setDefersLoading(defers);

    if (defers) {
        if (m_dataLoadTimer.isActive())
            m_dataLoadTimer.stop();
    } else {
        if (m_initialRequest.isNull())
            return;

        if (m_substituteData.isValid() && m_documentLoader->deferMainResourceDataLoad())
            startDataLoadTimer();
        else {
            ResourceRequest r(m_initialRequest);
            m_initialRequest = ResourceRequest();
            loadNow(r);
        }
    }
}

void MainResourceLoader::setDefersLoading(bool defers)
{
    ResourceLoader::setDefersLoading(defers);

    if (defers) {
        if (m_dataLoadTimer.isActive())
            m_dataLoadTimer.stop();
    } else {
        if (m_initialRequest.isNull())
            return;

        if (m_substituteData.isValid() && m_documentLoader->deferMainResourceDataLoad())
            startDataLoadTimer();
        else {
            ResourceRequest r(m_initialRequest);
            m_initialRequest = ResourceRequest();
            loadNow(r);
        }
    }
}
