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(); } }
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))); }
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))); }
void InspectorTimelineAgent::start(ErrorString&, const int* maxCallStackDepth) { m_enabledFromFrontend = true; internalStart(maxCallStackDepth); }
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(); }
void WorkingDetector::internalStart() { disconnect(_timer, SIGNAL(timeout()), this, SLOT(internalStart())); _timer->start(1000); connect(_timer, SIGNAL(timeout()), this, SLOT(checkIdle())); }
void WorkingDetector::stopDetection() { disconnect(_timer, SIGNAL(timeout()), this, SLOT(checkIdle())); disconnect(_timer, SIGNAL(timeout()), this, SLOT(internalStart())); disconnect(_timer, SIGNAL(timeout()), this, SLOT(notify())); }
void WorkingDetector::startDetection() { _timer->start(_checkTime); connect(_timer, SIGNAL(timeout()), this, SLOT(internalStart())); }