コード例 #1
0
ファイル: workingdetector.cpp プロジェクト: crossleyjuan/djon
void WorkingDetector::notify() {
    long idlesecs = idleTime();
    _timer->stop();
    disconnect(_timer, SIGNAL(timeout()), this, SLOT(notify()));
    if (idlesecs < 20) {
        emit workingDetected(*_lastDetected);
    } else {
        // The user stopped working again and everything should restart from the initial detection
        internalStart();
    }
}
コード例 #2
0
void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String &title)
{
    // Only allow recording of a profile if it is anonymous (empty title) or does not match
    // the title of an already recording profile.
    if (!title.isEmpty()) {
        for (const TimelineRecordEntry& record : m_pendingConsoleProfileRecords) {
            String recordTitle;
            record.data->getString(ASCIILiteral("title"), recordTitle);
            if (recordTitle == title)
                return;
        }
    }

    if (!m_enabled && m_pendingConsoleProfileRecords.isEmpty())
        internalStart();

    startProfiling(exec, title, m_instrumentingAgents.inspectorEnvironment().executionStopwatch());

    m_pendingConsoleProfileRecords.append(createRecordEntry(TimelineRecordFactory::createConsoleProfileData(title), TimelineRecordType::ConsoleProfile, true, frameFromExecState(exec)));
}
コード例 #3
0
void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String &title)
{
    // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler

    // Only allow recording of a profile if it is anonymous (empty title) or does not match
    // the title of an already recording profile.
    if (!title.isEmpty()) {
        for (const TimelineRecordEntry& record : m_pendingConsoleProfileRecords) {
            String recordTitle;
            record.data->getString(ASCIILiteral("title"), recordTitle);
            if (recordTitle == title)
                return;
        }
    }

    if (!m_enabled && m_pendingConsoleProfileRecords.isEmpty())
        internalStart();

    JSC::LegacyProfiler::profiler()->startProfiling(exec, title, m_environment.executionStopwatch());

    m_pendingConsoleProfileRecords.append(createRecordEntry(TimelineRecordFactory::createConsoleProfileData(title), TimelineRecordType::ConsoleProfile, true, frameFromExecState(exec)));
}
コード例 #4
0
void InspectorTimelineAgent::start(ErrorString&, const int* maxCallStackDepth)
{
    m_enabledFromFrontend = true;

    internalStart(maxCallStackDepth);
}
コード例 #5
0
ファイル: oputil.cpp プロジェクト: daddyreb/Bigit_Genie
BaseOp::BaseOp(const QString& url, QNetworkAccessManager *nam, QObject *parent)
: SimpleOp(parent), m_stage(Stage_Constructed), m_nam(nam), m_reply(NULL), m_url(url)
{
	internalStart();
}
コード例 #6
0
ファイル: workingdetector.cpp プロジェクト: crossleyjuan/djon
void WorkingDetector::internalStart() {
    disconnect(_timer, SIGNAL(timeout()), this, SLOT(internalStart()));
    _timer->start(1000);
    connect(_timer, SIGNAL(timeout()), this, SLOT(checkIdle()));
}
コード例 #7
0
ファイル: workingdetector.cpp プロジェクト: crossleyjuan/djon
void WorkingDetector::stopDetection() {
    disconnect(_timer, SIGNAL(timeout()), this, SLOT(checkIdle()));
    disconnect(_timer, SIGNAL(timeout()), this, SLOT(internalStart()));
    disconnect(_timer, SIGNAL(timeout()), this, SLOT(notify()));
}
コード例 #8
0
ファイル: workingdetector.cpp プロジェクト: crossleyjuan/djon
void WorkingDetector::startDetection() {
    _timer->start(_checkTime);
    connect(_timer, SIGNAL(timeout()), this, SLOT(internalStart()));
}