这篇教程C++ stopUpdating函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中stopUpdating函数的典型用法代码示例。如果您正苦于以下问题:C++ stopUpdating函数的具体用法?C++ stopUpdating怎么用?C++ stopUpdating使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了stopUpdating函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: stopUpdatingvoid DeviceMotionController::didRemoveEventListener(DOMWindow*, const AtomicString& eventType){ if (eventType == eventNames().devicemotionEvent) { stopUpdating(); m_hasEventListener = false; }}
开发者ID:huningxin,项目名称:blink-crosswalk,代码行数:7,
示例2: ASSERTvoid 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: stopUpdatingvoid Geolocation::clearWatch(int watchId){ m_watchers.remove(watchId); if (!hasListeners()) stopUpdating();}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:7,
示例4: copyToVectorvoid 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: stopUpdatingvoid 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: setupUiQDroneDesktop::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: startUpdatingvoid ScreenOrientationController::notifyDispatcher(){ if (m_orientation && page()->visibilityState() == PageVisibilityStateVisible) startUpdating(); else stopUpdating();}
开发者ID:kjthegod,项目名称:WebKit,代码行数:7,
示例8: ifvoid 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: startUpdatingvoid ScreenOrientationController::notifyDispatcher(){ if (m_orientation && page()->isPageVisible()) startUpdating(); else stopUpdating();}
开发者ID:mtucker6784,项目名称:chromium,代码行数:7,
示例10: stopUpdatingvoid 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: stopUpdatingvoid DeviceOrientationController::didRemoveEventListener(DOMWindow* window, const AtomicString& eventType){ if (eventType == EventTypeNames::deviceorientation) { stopUpdating(); m_hasEventListener = false; }}
开发者ID:kublaj,项目名称:blink,代码行数:7,
示例12: stopUpdatingvoid DeviceSingleWindowEventController::didRemoveEventListener(LocalDOMWindow* window, const AtomicString& eventType){ if (eventType != eventTypeName() || window->hasEventListeners(eventTypeName())) return; stopUpdating(); m_hasEventListener = false;}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:8,
示例13: startUpdatingvoid PlatformEventController::pageVisibilityChanged() { if (!m_hasEventListener) return; if (page()->isPageVisible()) startUpdating(); else stopUpdating();}
开发者ID:mirror,项目名称:chromium,代码行数:9,
示例14: stopTimersvoid 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: cancelAllRequestsvoid 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: startUpdatingvoid DeviceEventControllerBase::pageVisibilityChanged(){ if (!m_hasEventListener) return; if (page()->visibilityState() == PageVisibilityStateVisible) startUpdating(); else stopUpdating();}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:10,
示例17: cancelAllRequestsvoid 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: cancelAllRequestsvoid 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: USEvoid 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: documentvoid 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: documentvoid 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: DCHECKvoid 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: ENABLEvoid 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: ASSERTvoid 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: ASSERTvoid 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: pagevoid 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函数代码示例 |