コード例 #1
0
void PlatformEventController::oneShotCallback(TimerBase* timer) {
  DCHECK_EQ(timer, &m_timer);
  ASSERT(hasLastData());
  ASSERT(!m_timer.isActive());

  didUpdateData();
}
コード例 #2
0
void DeviceEventControllerBase::oneShotCallback(Timer<DeviceEventControllerBase>* timer)
{
    ASSERT_UNUSED(timer, timer == &m_timer);
    ASSERT(hasLastData());
    ASSERT(!m_timer.isActive());

    didUpdateData();
}
コード例 #3
0
void DeviceSensorEventController::fireDeviceEvent(Timer<DeviceSensorEventController>* timer)
{
    ASSERT_UNUSED(timer, timer == &m_timer);
    ASSERT(hasLastData());

    m_timer.stop();
    dispatchDeviceEvent(getLastEvent());
}
コード例 #4
0
void PlatformEventController::oneShotCallback(Timer<PlatformEventController>* timer)
{
    ASSERT_UNUSED(timer, timer == &m_timer);
    ASSERT(hasLastData());
    ASSERT(!m_timer.isActive());

    didUpdateData();
}
コード例 #5
0
void PlatformEventController::startUpdating() {
  if (m_isActive)
    return;

  if (hasLastData() && !m_timer.isActive()) {
    // Make sure to fire the data as soon as possible.
    m_timer.startOneShot(0, BLINK_FROM_HERE);
  }

  registerWithDispatcher();
  m_isActive = true;
}