当前位置: 首页>>代码示例>>C++>>正文


C++ Geolocation::setIsAllowed方法代码示例

本文整理汇总了C++中Geolocation::setIsAllowed方法的典型用法代码示例。如果您正苦于以下问题:C++ Geolocation::setIsAllowed方法的具体用法?C++ Geolocation::setIsAllowed怎么用?C++ Geolocation::setIsAllowed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Geolocation的用法示例。


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

示例1: setPermission

void GeolocationPermissionClientQt::setPermission(QWebFrame* webFrame, QWebPage::PermissionPolicy permission)
{  
    if (!m_pendingPermissionRequests.contains(webFrame)) 
        return;

    Geolocation* listener = m_pendingPermissionRequests.value(webFrame);

    if (permission == QWebPage::PermissionGrantedByUser)
        listener->setIsAllowed(true);
    else if (permission == QWebPage::PermissionDeniedByUser)
        listener->setIsAllowed(false);
    else
        return;

    m_pendingPermissionRequests.remove(webFrame);
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:16,代码来源:GeolocationPermissionClientQt.cpp

示例2: didReceiveGeolocationPermissionDecision

void GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
{
    IDToGeolocationMap::iterator it = m_idToGeolocationMap.find(geolocationID);
    if (it == m_idToGeolocationMap.end())
        return;

    Geolocation* geolocation = it->value;
    geolocation->setIsAllowed(allowed);

    m_idToGeolocationMap.remove(it);
    m_geolocationToIDMap.remove(geolocation);
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:12,代码来源:GeolocationPermissionRequestManager.cpp

示例3: maybeCallbackFrames

void GeolocationPermissions::maybeCallbackFrames(String origin, bool allow)
{
    // We can't track which frame issued the request, as frames can be deleted
    // or have their contents replaced. Even uniqueChildName is not unique when
    // frames are dynamically deleted and created. Instead, we simply call back
    // to the Geolocation object in all frames from the correct origin.
    for (Frame* frame = m_mainFrame; frame; frame = frame->tree()->traverseNext()) {
        if (origin == frame->document()->securityOrigin()->toString()) {
            // If the page has changed, it may no longer have a Geolocation
            // object.
            Geolocation* geolocation = frame->domWindow()->navigator()->optionalGeolocation();
            if (geolocation)
                geolocation->setIsAllowed(allow);
        }
    }
}
开发者ID:Androtos,项目名称:toolchain_benchmark,代码行数:16,代码来源:GeolocationPermissions.cpp

示例4: onPermission

void GeolocationControllerClientBlackBerry::onPermission(void* context, bool isAllowed)
{
    Geolocation* position = static_cast<Geolocation*>(context);
    position->setIsAllowed(isAllowed);
}
开发者ID:Moondee,项目名称:Artemis,代码行数:5,代码来源:GeolocationControllerClientBlackBerry.cpp


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