本文整理汇总了C++中copyValuesToVector函数的典型用法代码示例。如果您正苦于以下问题:C++ copyValuesToVector函数的具体用法?C++ copyValuesToVector怎么用?C++ copyValuesToVector使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了copyValuesToVector函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: animations
void CompositeAnimationPrivate::styleAvailable()
{
if (m_numStyleAvailableWaiters == 0)
return;
// We have to go through animations in the order in which they appear in
// the style, because order matters for additivity.
Vector<RefPtr<KeyframeAnimation> > animations(m_keyframeAnimations.size());
copyValuesToVector(m_keyframeAnimations, animations);
if (animations.size() > 1)
std::stable_sort(animations.begin(), animations.end(), compareAnimationIndices);
for (size_t i = 0; i < animations.size(); ++i) {
KeyframeAnimation* anim = animations[i].get();
if (anim && anim->waitingForStyleAvailable())
anim->updateStateMachine(AnimationBase::AnimationStateInputStyleAvailable, -1);
}
CSSPropertyTransitionsMap::const_iterator end = m_transitions.end();
for (CSSPropertyTransitionsMap::const_iterator it = m_transitions.begin(); it != end; ++it) {
ImplicitAnimation* anim = it->second.get();
if (anim && anim->waitingForStyleAvailable())
anim->updateStateMachine(AnimationBase::AnimationStateInputStyleAvailable, -1);
}
}
示例2: copyValuesToVector
void NPRuntimeObjectMap::invalidate()
{
Vector<NPJSObject*> npJSObjects;
copyValuesToVector(m_npJSObjects, npJSObjects);
// Deallocate all the object wrappers so we won't leak any JavaScript objects.
for (size_t i = 0; i < npJSObjects.size(); ++i)
deallocateNPObject(npJSObjects[i]);
// We shouldn't have any NPJSObjects left now.
ASSERT(m_npJSObjects.isEmpty());
Vector<NPObject*> objects;
for (HashMap<NPObject*, JSC::Weak<JSNPObject>>::iterator ptr = m_jsNPObjects.begin(), end = m_jsNPObjects.end(); ptr != end; ++ptr) {
JSNPObject* jsNPObject = ptr->value.get();
if (!jsNPObject) // Skip zombies.
continue;
objects.append(jsNPObject->leakNPObject());
}
m_jsNPObjects.clear();
for (size_t i = 0; i < objects.size(); ++i)
releaseNPObject(objects[i]);
// Deal with any objects that were scheduled for delayed destruction
if (m_npObjectsToFinalize.isEmpty())
return;
ASSERT(m_finalizationTimer.isActive());
m_finalizationTimer.stop();
invalidateQueuedObjects();
}
示例3: copyValuesToVector
void WebProcessProxy::interactionOccurredWhileUnresponsive(ResponsivenessTimer*)
{
Vector<RefPtr<WebPageProxy>> pages;
copyValuesToVector(m_pageMap, pages);
for (size_t i = 0, size = pages.size(); i < size; ++i)
pages[i]->interactionOccurredWhileProcessUnresponsive();
}
示例4: unscheduleAll
static void unscheduleAll(const ResourceLoaderMap& loaders, SchedulePair& pair)
{
Vector<RefPtr<ResourceLoader>> loadersCopy;
copyValuesToVector(loaders, loadersCopy);
for (auto& loader : loadersCopy)
loader->unschedule(pair);
}
示例5: shutDownProcess
void WebProcessProxy::shutDown()
{
shutDownProcess();
if (m_webConnection) {
m_webConnection->invalidate();
m_webConnection = nullptr;
}
m_responsivenessTimer.invalidate();
m_tokenForHoldingLockedFiles = nullptr;
Vector<RefPtr<WebFrameProxy>> frames;
copyValuesToVector(m_frameMap, frames);
for (size_t i = 0, size = frames.size(); i < size; ++i)
frames[i]->webProcessWillShutDown();
m_frameMap.clear();
if (m_downloadProxyMap)
m_downloadProxyMap->processDidClose();
for (VisitedLinkProvider* visitedLinkProvider : m_visitedLinkProviders)
visitedLinkProvider->removeProcess(*this);
m_visitedLinkProviders.clear();
for (WebUserContentControllerProxy* webUserContentControllerProxy : m_webUserContentControllerProxies)
webUserContentControllerProxy->removeProcess(*this);
m_webUserContentControllerProxies.clear();
m_processPool->disconnectProcess(this);
}
示例6: copyValuesToVector
void NetscapePlugin::stopAllStreams()
{
Vector<RefPtr<NetscapePluginStream> > streams;
copyValuesToVector(m_streams, streams);
for (size_t i = 0; i < streams.size(); ++i)
streams[i]->stop(NPRES_USER_BREAK);
}
示例7: copyValuesToVector
MediaStreamTrackPrivateVector MediaStreamPrivate::tracks() const
{
MediaStreamTrackPrivateVector tracks;
tracks.reserveCapacity(m_trackSet.size());
copyValuesToVector(m_trackSet, tracks);
return tracks;
}
示例8: copyValuesToVector
void WebProcessConnection::didClose(CoreIPC::Connection*)
{
// The web process crashed. Destroy all the plug-in controllers. Destroying the last plug-in controller
// will cause the web process connection itself to be destroyed.
Vector<PluginControllerProxy*> pluginControllers;
copyValuesToVector(m_pluginControllers, pluginControllers);
for (size_t i = 0; i < pluginControllers.size(); ++i)
destroyPluginControllerProxy(pluginControllers[i]);
}
示例9: copyValuesToVector
void WebPageProxy::close()
{
if (!isValid())
return;
m_closed = true;
Vector<RefPtr<WebFrameProxy> > frames;
copyValuesToVector(m_frameMap, frames);
for (size_t i = 0, size = frames.size(); i < size; ++i)
frames[i]->disconnect();
m_frameMap.clear();
m_mainFrame = 0;
m_pageTitle = String();
m_toolTip = String();
Vector<RefPtr<ScriptReturnValueCallback> > scriptReturnValueCallbacks;
copyValuesToVector(m_scriptReturnValueCallbacks, scriptReturnValueCallbacks);
for (size_t i = 0, size = scriptReturnValueCallbacks.size(); i < size; ++i)
scriptReturnValueCallbacks[i]->invalidate();
m_scriptReturnValueCallbacks.clear();
Vector<RefPtr<RenderTreeExternalRepresentationCallback> > renderTreeExternalRepresentationCallbacks;
copyValuesToVector(m_renderTreeExternalRepresentationCallbacks, renderTreeExternalRepresentationCallbacks);
for (size_t i = 0, size = renderTreeExternalRepresentationCallbacks.size(); i < size; ++i)
renderTreeExternalRepresentationCallbacks[i]->invalidate();
m_renderTreeExternalRepresentationCallbacks.clear();
m_canGoForward = false;
m_canGoBack = false;
m_loaderClient.initialize(0);
m_policyClient.initialize(0);
m_uiClient.initialize(0);
m_drawingArea.clear();
process()->connection()->send(WebPageMessage::Close, m_pageID, CoreIPC::In());
process()->removeWebPage(m_pageID);
}
示例10: protect
void WebProcessProxy::didClose(CoreIPC::Connection*)
{
// Protect ourselves, as the call to disconnect() below may otherwise cause us
// to be deleted before we can finish our work.
RefPtr<WebProcessProxy> protect(this);
Vector<RefPtr<WebPageProxy> > pages;
copyValuesToVector(m_pageMap, pages);
disconnect();
for (size_t i = 0, size = pages.size(); i < size; ++i)
pages[i]->processDidCrash();
}
示例11: copyValuesToVector
void WebProcessProxy::didClose(CoreIPC::Connection*)
{
m_connection = 0;
m_responsivenessTimer.stop();
Vector<RefPtr<WebPageProxy> > pages;
copyValuesToVector(m_pageMap, pages);
for (size_t i = 0, size = pages.size(); i < size; ++i)
pages[i]->processDidExit();
// This may cause us to be deleted.
WebProcessManager::shared().processDidClose(this);
}
示例12: protector
void NetworkConnectionToWebProcess::didClose(IPC::Connection&)
{
// Protect ourself as we might be otherwise be deleted during this function.
Ref<NetworkConnectionToWebProcess> protector(*this);
Vector<RefPtr<NetworkResourceLoader>> loaders;
copyValuesToVector(m_networkResourceLoaders, loaders);
for (auto& loader : loaders)
loader->abort();
ASSERT(m_networkResourceLoaders.isEmpty());
NetworkBlobRegistry::singleton().connectionToWebProcessDidClose(this);
NetworkProcess::singleton().removeNetworkConnectionToWebProcess(this);
}
示例13: ASSERT
void WebPageProxy::processDidExit()
{
ASSERT(m_pageClient);
m_valid = false;
if (m_mainFrame)
m_urlAtProcessExit = m_mainFrame->url();
Vector<RefPtr<WebFrameProxy> > frames;
copyValuesToVector(m_frameMap, frames);
for (size_t i = 0, size = frames.size(); i < size; ++i)
frames[i]->disconnect();
m_frameMap.clear();
m_mainFrame = 0;
m_pageTitle = String();
m_toolTip = String();
Vector<RefPtr<ScriptReturnValueCallback> > scriptReturnValueCallbacks;
copyValuesToVector(m_scriptReturnValueCallbacks, scriptReturnValueCallbacks);
for (size_t i = 0, size = scriptReturnValueCallbacks.size(); i < size; ++i)
scriptReturnValueCallbacks[i]->invalidate();
m_scriptReturnValueCallbacks.clear();
Vector<RefPtr<RenderTreeExternalRepresentationCallback> > renderTreeExternalRepresentationCallbacks;
copyValuesToVector(m_renderTreeExternalRepresentationCallbacks, renderTreeExternalRepresentationCallbacks);
for (size_t i = 0, size = renderTreeExternalRepresentationCallbacks.size(); i < size; ++i)
renderTreeExternalRepresentationCallbacks[i]->invalidate();
m_renderTreeExternalRepresentationCallbacks.clear();
m_canGoForward = false;
m_canGoBack = false;
m_pageClient->processDidExit();
}
示例14: callOnMainThread
void ResourceUsageThread::notifyObservers(ResourceUsageData&& data)
{
callOnMainThread([data = WTFMove(data)]() mutable {
Vector<std::function<void (const ResourceUsageData&)>> functions;
{
auto& resourceUsageThread = ResourceUsageThread::singleton();
LockHolder locker(resourceUsageThread.m_lock);
copyValuesToVector(resourceUsageThread.m_observers, functions);
}
for (auto& function : functions)
function(data);
});
}
示例15: copyValuesToVector
void WebProcessProxy::disconnect()
{
if (m_connection) {
m_connection->connection()->removeQueueClient(this);
m_connection->invalidate();
m_connection = nullptr;
}
m_responsivenessTimer.stop();
Vector<RefPtr<WebFrameProxy> > frames;
copyValuesToVector(m_frameMap, frames);
for (size_t i = 0, size = frames.size(); i < size; ++i)
frames[i]->disconnect();
m_frameMap.clear();
m_context->disconnectProcess(this);
}