您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ stopUpdating函数代码示例

51自学网 2021-06-03 08:24:17
  C++
这篇教程C++ stopUpdating函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中stopUpdating函数的典型用法代码示例。如果您正苦于以下问题:C++ stopUpdating函数的具体用法?C++ stopUpdating怎么用?C++ stopUpdating使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了stopUpdating函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: stopUpdating

void DeviceMotionController::didRemoveEventListener(DOMWindow*, const AtomicString& eventType){    if (eventType == eventNames().devicemotionEvent) {        stopUpdating();        m_hasEventListener = false;    }}
开发者ID:huningxin,项目名称:blink-crosswalk,代码行数:7,


示例2: ASSERT

void Geolocation::makeSuccessCallbacks(){    ASSERT(lastPosition());    ASSERT(isAllowed());    GeoNotifierVector oneShotsCopy;    copyToVector(m_oneShots, oneShotsCopy);    GeoNotifierVector watchersCopy;    m_watchers.getNotifiersVector(watchersCopy);    // Clear the lists before we make the callbacks, to avoid clearing notifiers    // added by calls to Geolocation methods from the callbacks, and to prevent    // further callbacks to these notifiers.    m_oneShots.clear();    // Also clear the set of notifiers waiting for a cached position. All the    // oneshots and watchers will receive a position now, and if they happen to    // be lingering in that set, avoid this bug: http://crbug.com/311876 .    m_requestsAwaitingCachedPosition.clear();    sendPosition(oneShotsCopy, lastPosition());    sendPosition(watchersCopy, lastPosition());    if (!hasListeners())        stopUpdating();}
开发者ID:howardroark2018,项目名称:chromium,代码行数:27,


示例3: stopUpdating

void Geolocation::clearWatch(int watchId){    m_watchers.remove(watchId);        if (!hasListeners())        stopUpdating();}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:7,


示例4: copyToVector

void Geolocation::handleError(PositionError& error){    auto oneShotsCopy = copyToVector(m_oneShots);    GeoNotifierVector watchersCopy;    m_watchers.getNotifiersVector(watchersCopy);    // Clear the lists before we make the callbacks, to avoid clearing notifiers    // added by calls to Geolocation methods from the callbacks, and to prevent    // further callbacks to these notifiers.    GeoNotifierVector oneShotsWithCachedPosition;    m_oneShots.clear();    if (error.isFatal())        m_watchers.clear();    else {        // Don't send non-fatal errors to notifiers due to receive a cached position.        extractNotifiersWithCachedPosition(oneShotsCopy, &oneShotsWithCachedPosition);        extractNotifiersWithCachedPosition(watchersCopy, 0);    }    sendError(oneShotsCopy, error);    sendError(watchersCopy, error);    // hasListeners() doesn't distinguish between notifiers due to receive a    // cached position and those requiring a fresh position. Perform the check    // before restoring the notifiers below.    if (!hasListeners())        stopUpdating();    // Maintain a reference to the cached notifiers until their timer fires.    copyToSet(oneShotsWithCachedPosition, m_oneShots);}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:32,


示例5: stopUpdating

void Geolocation::makeCachedPositionCallbacks(){    // All modifications to m_requestsAwaitingCachedPosition are done    // asynchronously, so we don't need to worry about it being modified from    // the callbacks.    for (auto& notifier : m_requestsAwaitingCachedPosition) {        // FIXME: This seems wrong, since makeCachedPositionCallbacks() is called in a branch where        // lastPosition() is known to be null in Geolocation::setIsAllowed().        notifier->runSuccessCallback(lastPosition());        // If this is a one-shot request, stop it. Otherwise, if the watch still        // exists, start the service to get updates.        if (!m_oneShots.remove(notifier.get()) && m_watchers.contains(notifier.get())) {            if (notifier->hasZeroTimeout() || startUpdating(notifier.get()))                notifier->startTimerIfNeeded();            else                notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));        }    }    m_requestsAwaitingCachedPosition.clear();    if (!hasListeners())        stopUpdating();}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:25,


示例6: setupUi

QDroneDesktop::QDroneDesktop() {  setupUi(this);    _dctrl = new DeviceController();  _pDashboard = new QDroneDashboard(_dctrl, this->wCtrlContainer);  _pDriveCtrl = new QDriveControl(_dctrl, this->wCtrlContainer);  _pAnimCtrl = new QAnimationControl(_dctrl, this->wCtrlContainer);  this->wCtrlContainer->layout()->addWidget(_pDashboard);  this->wCtrlContainer->layout()->addWidget(_pDriveCtrl);  this->wCtrlContainer->layout()->addWidget(_pAnimCtrl);    QGridLayout* videoLayout = new QGridLayout();  videoLayout->setContentsMargins(0, 0, 0, 0);  videoLayout->setObjectName(QString::fromUtf8("videoLayout"));  wVideoContainer->setLayout(videoLayout);  connect(actionConnect, SIGNAL(triggered()), this, SLOT(connectDrone()));  connect(actionDisonnect, SIGNAL(triggered()), this, SLOT(disconnectDrone()));  connect(actionStart_Video, SIGNAL(triggered()), this, SLOT(startVideo()));  connect(actionStop_Video, SIGNAL(triggered()), this, SLOT(stopVideo()));  connect(actionStart_Updating, SIGNAL(triggered()), _pDashboard, SLOT(startUpdating()));  connect(actionStop_Updating, SIGNAL(triggered()), _pDashboard, SLOT(stopUpdating()));}
开发者ID:keinzweifall,项目名称:race-drone-ide,代码行数:25,


示例7: startUpdating

void ScreenOrientationController::notifyDispatcher(){    if (m_orientation && page()->visibilityState() == PageVisibilityStateVisible)        startUpdating();    else        stopUpdating();}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,


示例8: if

void Geolocation::makeCachedPositionCallbacks(){    // All modifications to m_requestsAwaitingCachedPosition are done    // asynchronously, so we don't need to worry about it being modified from    // the callbacks.    GeoNotifierSet::const_iterator end = m_requestsAwaitingCachedPosition.end();    for (GeoNotifierSet::const_iterator iter = m_requestsAwaitingCachedPosition.begin(); iter != end; ++iter) {        GeoNotifier* notifier = iter->get();        notifier->runSuccessCallback(lastPosition());        // If this is a one-shot request, stop it. Otherwise, if the watch still        // exists, start the service to get updates.        if (m_oneShots.contains(notifier))            m_oneShots.remove(notifier);        else if (m_watchers.contains(notifier)) {            if (notifier->hasZeroTimeout() || startUpdating(notifier))                notifier->startTimerIfNeeded();            else                notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));        }    }    m_requestsAwaitingCachedPosition.clear();    if (!hasListeners())        stopUpdating();}
开发者ID:eugenejen,项目名称:wkhtmltopdf,代码行数:27,


示例9: startUpdating

void ScreenOrientationController::notifyDispatcher(){    if (m_orientation && page()->isPageVisible())        startUpdating();    else        stopUpdating();}
开发者ID:mtucker6784,项目名称:chromium,代码行数:7,


示例10: stopUpdating

void Geolocation::requestTimedOut(GeoNotifier* notifier) {  // If this is a one-shot request, stop it.  m_oneShots.remove(notifier);  if (!hasListeners())    stopUpdating();}
开发者ID:mirror,项目名称:chromium,代码行数:7,


示例11: stopUpdating

void DeviceOrientationController::didRemoveEventListener(DOMWindow* window, const AtomicString& eventType){    if (eventType == EventTypeNames::deviceorientation) {        stopUpdating();        m_hasEventListener = false;    }}
开发者ID:kublaj,项目名称:blink,代码行数:7,


示例12: stopUpdating

void DeviceSingleWindowEventController::didRemoveEventListener(LocalDOMWindow* window, const AtomicString& eventType){    if (eventType != eventTypeName() || window->hasEventListeners(eventTypeName()))        return;    stopUpdating();    m_hasEventListener = false;}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:8,


示例13: startUpdating

void PlatformEventController::pageVisibilityChanged() {  if (!m_hasEventListener)    return;  if (page()->isPageVisible())    startUpdating();  else    stopUpdating();}
开发者ID:mirror,项目名称:chromium,代码行数:9,


示例14: stopTimers

void Geolocation::disconnectFrame(){    if (m_frame && m_frame->page() && m_allowGeolocation == InProgress)        m_frame->page()->chrome()->cancelGeolocationPermissionRequestForFrame(m_frame, this);    stopTimers();    stopUpdating();    if (m_frame && m_frame->document())        m_frame->document()->setUsingGeolocation(false);    m_frame = 0;}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:10,


示例15: cancelAllRequests

void Geolocation::contextDestroyed() {  m_permissionService.reset();  cancelAllRequests();  stopUpdating();  m_geolocationPermission = PermissionDenied;  m_pendingForPermissionNotifiers.clear();  m_lastPosition = nullptr;  ContextLifecycleObserver::clearContext();  PageVisibilityObserver::clearContext();}
开发者ID:mirror,项目名称:chromium,代码行数:10,


示例16: startUpdating

void DeviceEventControllerBase::pageVisibilityChanged(){    if (!m_hasEventListener)        return;    if (page()->visibilityState() == PageVisibilityStateVisible)        startUpdating();    else        stopUpdating();}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:10,


示例17: cancelAllRequests

void Geolocation::stop(){    Page* page = this->page();    if (page && m_allowGeolocation == InProgress)        GeolocationController::from(page)->cancelPermissionRequest(this);    // The frame may be moving to a new page and we want to get the permissions from the new page's client.    m_allowGeolocation = Unknown;    cancelAllRequests();    stopUpdating();    m_pendingForPermissionNotifiers.clear();}
开发者ID:eugenejen,项目名称:wkhtmltopdf,代码行数:11,


示例18: cancelAllRequests

void Geolocation::stop(){    LocalFrame* frame = this->frame();    if (frame && m_geolocationPermission == PermissionRequested)        GeolocationController::from(frame)->cancelPermissionRequest(this);    // The frame may be moving to a new page and we want to get the permissions from the new page's client.    m_geolocationPermission = PermissionUnknown;    cancelAllRequests();    stopUpdating();    m_pendingForPermissionNotifiers.clear();}
开发者ID:howardroark2018,项目名称:chromium,代码行数:12,


示例19: USE

void Geolocation::clearWatch(int watchId){    if (watchId < firstAvailableWatchId)        return;#if USE(PREEMPT_GEOLOCATION_PERMISSION)    if (GeoNotifier* notifier = m_watchers.find(watchId))        m_pendingForPermissionNotifiers.remove(notifier);#endif    m_watchers.remove(watchId);        if (!hasListeners())        stopUpdating();}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:14,


示例20: document

void DeviceSingleWindowEventController::dispatchDeviceEvent(RawPtr<Event> prpEvent){    if (!document().domWindow() || document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped())        return;    RawPtr<Event> event = prpEvent;    document().domWindow()->dispatchEvent(event);    if (m_needsCheckingNullEvents) {        if (isNullEvent(event.get()))            stopUpdating();        else            m_needsCheckingNullEvents = false;    }}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:15,


示例21: document

void DeviceSensorEventController::dispatchDeviceEvent(PassRefPtrWillBeRawPtr<Event> prpEvent){    Document* targetDocument = document();    if (!targetDocument || !targetDocument->domWindow() || targetDocument->activeDOMObjectsAreSuspended() || targetDocument->activeDOMObjectsAreStopped())        return;    RefPtrWillBeRawPtr<Event> event = prpEvent;    targetDocument->domWindow()->dispatchEvent(event);    if (m_needsCheckingNullEvents) {        if (isNullEvent(event.get()))            stopUpdating();        else            m_needsCheckingNullEvents = false;    }}
开发者ID:coinpayee,项目名称:blink,代码行数:17,


示例22: DCHECK

void Geolocation::requestUsesCachedPosition(GeoNotifier* notifier) {  DCHECK(isAllowed());  notifier->runSuccessCallback(m_lastPosition);  // If this is a one-shot request, stop it. Otherwise, if the watch still  // exists, start the service to get updates.  if (m_oneShots.contains(notifier)) {    m_oneShots.remove(notifier);  } else if (m_watchers.contains(notifier)) {    if (notifier->options().timeout())      startUpdating(notifier);    notifier->startTimer();  }  if (!hasListeners())    stopUpdating();}
开发者ID:mirror,项目名称:chromium,代码行数:18,


示例23: ENABLE

void Geolocation::reset(){    Page* page = this->page();    if (page && m_allowGeolocation == InProgress) {#if ENABLE(CLIENT_BASED_GEOLOCATION)        page->geolocationController()->cancelPermissionRequest(this);#else        page->chrome()->client()->cancelGeolocationPermissionRequestForFrame(m_frame, this);#endif    }    // The frame may be moving to a new page and we want to get the permissions from the new page's client.    m_allowGeolocation = Unknown;    cancelAllRequests();    stopUpdating();#if USE(PREEMPT_GEOLOCATION_PERMISSION)    m_pendingForPermissionNotifiers.clear();#endif}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:18,


示例24: ASSERT

void Geolocation::makeSuccessCallbacks(Geoposition& position){    ASSERT(lastPosition());    ASSERT(isAllowed());        auto oneShotsCopy = copyToVector(m_oneShots);        GeoNotifierVector watchersCopy;    m_watchers.getNotifiersVector(watchersCopy);        // Clear the lists before we make the callbacks, to avoid clearing notifiers    // added by calls to Geolocation methods from the callbacks, and to prevent    // further callbacks to these notifiers.    m_oneShots.clear();    sendPosition(oneShotsCopy, position);    sendPosition(watchersCopy, position);    if (!hasListeners())        stopUpdating();}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:21,


示例25: ASSERT

void Geolocation::handleError(PositionError* error){    ASSERT(error);        Vector<RefPtr<GeoNotifier> > oneShotsCopy;    copyToVector(m_oneShots, oneShotsCopy);    Vector<RefPtr<GeoNotifier> > watchersCopy;    m_watchers.getNotifiersVector(watchersCopy);    // Clear the lists before we make the callbacks, to avoid clearing notifiers    // added by calls to Geolocation methods from the callbacks, and to prevent    // further callbacks to these notifiers.    m_oneShots.clear();    if (error->isFatal())        m_watchers.clear();    sendError(oneShotsCopy, error);    sendError(watchersCopy, error);    if (!hasListeners())        stopUpdating();}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:23,


示例26: page

void NavigatorGamepad::pageVisibilityChanged(){    // Inform the embedder whether it needs to provide gamepad data for us.    bool visible = page()->visibilityState() == PageVisibilityStateVisible;    if (visible && (m_hasEventListener || m_gamepads))        startUpdating();    else        stopUpdating();    if (!visible || !m_hasEventListener)        return;    // Tell the page what has changed. m_gamepads contains the state before we became hidden.    // We create a new snapshot and compare them.    GamepadList* oldGamepads = m_gamepads.release();    gamepads();    GamepadList* newGamepads = m_gamepads.get();    ASSERT(newGamepads);    for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {        Gamepad* oldGamepad = oldGamepads ? oldGamepads->item(i) : 0;        Gamepad* newGamepad = newGamepads->item(i);        bool oldWasConnected = oldGamepad && oldGamepad->connected();        bool newIsConnected = newGamepad && newGamepad->connected();        bool connectedGamepadChanged = oldWasConnected && newIsConnected && oldGamepad->id() != newGamepad->id();        if (connectedGamepadChanged || (oldWasConnected && !newIsConnected)) {            oldGamepad->setConnected(false);            m_pendingEvents.append(oldGamepad);        }        if (connectedGamepadChanged || (!oldWasConnected && newIsConnected)) {            m_pendingEvents.append(newGamepad);        }    }    if (!m_pendingEvents.isEmpty())        m_dispatchOneEventRunner.runAsync();}
开发者ID:kjthegod,项目名称:WebKit,代码行数:37,



注:本文中的stopUpdating函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ stop_all_notes函数代码示例
C++ stopTimer函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。