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


C++ WebPageProxy类代码示例

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


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

示例1: cloneSessionData

void WebsiteDataStore::cloneSessionData(WebPageProxy& sourcePage, WebPageProxy& newPage)
{
    auto& sourceDataStore = sourcePage.websiteDataStore();
    auto& newDataStore = newPage.websiteDataStore();

    // FIXME: Handle this.
    if (&sourceDataStore != &newDataStore)
        return;

    if (!sourceDataStore.m_storageManager)
        return;

    sourceDataStore.m_storageManager->cloneSessionStorageNamespace(sourcePage.pageID(), newPage.pageID());
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例2: paint

void ChunkedUpdateDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
{
    if (m_isWaitingForDidSetFrameNotification) {
        WebPageProxy* page = this->page();
        if (!page->isValid())
            return;

        std::auto_ptr<CoreIPC::ArgumentDecoder> arguments = page->process()->connection()->waitFor(DrawingAreaProxyMessage::DidSetSize, page->pageID(), 0.04);
        if (arguments.get())
            didReceiveMessage(page->process()->connection(), CoreIPC::MessageID(DrawingAreaProxyMessage::DidSetSize), *arguments.get());
    }

    platformPaint(rect, context);
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例3: providerDidClickNotification

void WebNotificationManagerProxy::providerDidClickNotification(uint64_t globalNotificationID)
{
    auto it = m_globalNotificationMap.find(globalNotificationID);
    if (it == m_globalNotificationMap.end())
        return;
    
    uint64_t webPageID = it->value.first;
    WebPageProxy* webPage = WebProcessProxy::webPage(webPageID);
    if (!webPage)
        return;

    uint64_t pageNotificationID = it->value.second;
    webPage->process().send(Messages::WebNotificationManager::DidClickNotification(pageNotificationID), 0);
}
开发者ID:houzhenggang,项目名称:webkit,代码行数:14,代码来源:WebNotificationManagerProxy.cpp

示例4: providerDidShowNotification

void WebNotificationManagerProxy::providerDidShowNotification(uint64_t globalNotificationID)
{
    HashMap<uint64_t, pair<uint64_t, uint64_t> >::iterator it = m_globalNotificationMap.find(globalNotificationID);
    if (it == m_globalNotificationMap.end())
        return;

    uint64_t webPageID = it->value.first;
    WebPageProxy* webPage = WebProcessProxy::webPage(webPageID);
    if (!webPage)
        return;

    uint64_t pageNotificationID = it->value.second;
    webPage->process()->send(Messages::WebNotificationManager::DidShowNotification(pageNotificationID), 0);
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:14,代码来源:WebNotificationManagerProxy.cpp

示例5: ewk_view_intent_deliver

Eina_Bool ewk_view_intent_deliver(Evas_Object* ewkView, Ewk_Intent* intent)
{
#if ENABLE(WEB_INTENTS)
    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
    EwkIntent* intentImpl = ewk_object_cast<EwkIntent*>(intent);
    EINA_SAFETY_ON_NULL_RETURN_VAL(intentImpl, false);

    WebPageProxy* page = impl->page();
    page->deliverIntentToFrame(page->mainFrame(), intentImpl->webIntentData());

    return true;
#else
    return false;
#endif
}
开发者ID:jiezh,项目名称:h5vcc,代码行数:15,代码来源:ewk_view.cpp

示例6: drawUpdateChunkIntoBackingStore

void ChunkedUpdateDrawingAreaProxy::update(UpdateChunk* updateChunk)
{
    if (!m_isVisible) {
        // We got an update request that must have been sent before we told the web process to suspend painting.
        // Don't paint this into the backing store, because that could leave the backing store in an inconsistent state.
        // Instead, we will just tell the drawing area to repaint everything when we resume painting.
        m_forceRepaintWhenResumingPainting = true;
    } else {
        // Just paint into backing store.
        drawUpdateChunkIntoBackingStore(updateChunk);
    }

    WebPageProxy* page = this->page();
    page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(id()));
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例7: WebColorPicker

WebColorPickerGtk::WebColorPickerGtk(WebPageProxy& page, const Color& initialColor, const IntRect&)
    : WebColorPicker(&page)
    , m_initialColor(initialColor)
    , m_webView(page.viewWidget())
    , m_colorChooser(nullptr)
{
}
开发者ID:fanghongjia,项目名称:JavaScriptCore,代码行数:7,代码来源:WebColorPickerGtk.cpp

示例8: ASSERT

void ChunkedUpdateDrawingAreaProxy::didSetSize(UpdateChunk* updateChunk)
{
    ASSERT(m_isWaitingForDidSetFrameNotification);
    m_isWaitingForDidSetFrameNotification = false;

    IntSize viewSize = updateChunk->rect().size();

    if (viewSize != m_lastSetViewSize)
        setSize(m_lastSetViewSize);

    invalidateBackingStore();
    drawUpdateChunkIntoBackingStore(updateChunk);

    WebPageProxy* page = this->page();
    page->process()->responsivenessTimer()->stop();
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例9: drawPagesForPrintingCompleted

static void drawPagesForPrintingCompleted(API::Error* wkPrintError, WebKitPrintOperation* printOperation)
{
    // When running synchronously WebPageProxy::printFrame() calls endPrinting().
    if (printOperation->priv->printMode == PrintInfo::PrintModeAsync && printOperation->priv->webView) {
        WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
        page->endPrinting();
    }

    const WebCore::ResourceError& resourceError = wkPrintError ? wkPrintError->platformError() : WebCore::ResourceError();
    if (!resourceError.isNull()) {
        GUniquePtr<GError> printError(g_error_new_literal(g_quark_from_string(resourceError.domain().utf8().data()),
            toWebKitError(resourceError.errorCode()), resourceError.localizedDescription().utf8().data()));
        g_signal_emit(printOperation, signals[FAILED], 0, printError.get());
    }
    g_signal_emit(printOperation, signals[FINISHED], 0, NULL);
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:16,代码来源:WebKitPrintOperation.cpp

示例10: platformCreateInspectorPage

// Called by WebInspectorProxy messages
void WebInspectorProxy::createInspectorPage(uint64_t& inspectorPageID, WebPageCreationParameters& inspectorPageParameters)
{
    inspectorPageID = 0;

    if (!m_page)
        return;

    WebPageProxy* inspectorPage = platformCreateInspectorPage();
    ASSERT(inspectorPage);
    if (!inspectorPage)
        return;

    inspectorPageID = inspectorPage->pageID();
    inspectorPageParameters = inspectorPage->creationParameters(IntSize(0, 0));

    inspectorPage->loadURL(inspectorPageURL());
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例11: Gesture

GestureController::ZoomGesture::ZoomGesture(WebPageProxy& page)
    : Gesture(gtk_gesture_zoom_new(page.viewWidget()), page)
    , m_initialScale(0)
    , m_scale(0)
{
    g_signal_connect_swapped(m_gesture.get(), "begin", G_CALLBACK(begin), this);
    g_signal_connect_swapped(m_gesture.get(), "scale-changed", G_CALLBACK(scaleChanged), this);
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:8,代码来源:GestureController.cpp

示例12: didReceiveWebProcessProxyMessage

void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
    if (messageID.is<CoreIPC::MessageClassWebProcessProxy>()) {
        didReceiveWebProcessProxyMessage(connection, messageID, arguments);
        return;
    }

    if (messageID.is<CoreIPC::MessageClassWebContext>()
        || messageID.is<CoreIPC::MessageClassWebContextLegacy>()
        || messageID.is<CoreIPC::MessageClassDownloadProxy>()
        || messageID.is<CoreIPC::MessageClassWebApplicationCacheManagerProxy>()
#if ENABLE(BATTERY_STATUS)
        || messageID.is<CoreIPC::MessageClassWebBatteryManagerProxy>()
#endif
        || messageID.is<CoreIPC::MessageClassWebCookieManagerProxy>()
        || messageID.is<CoreIPC::MessageClassWebDatabaseManagerProxy>()
        || messageID.is<CoreIPC::MessageClassWebGeolocationManagerProxy>()
        || messageID.is<CoreIPC::MessageClassWebIconDatabase>()
        || messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()
        || messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()
#if ENABLE(NETWORK_INFO)
        || messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()
#endif
        || messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()
#if USE(SOUP)
        || messageID.is<CoreIPC::MessageClassWebSoupRequestManagerProxy>()
#endif
#if ENABLE(VIBRATION)
        || messageID.is<CoreIPC::MessageClassWebVibrationProxy>()
#endif
        || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
        m_context->didReceiveMessage(this, messageID, arguments);
        return;
    }

    uint64_t pageID = arguments->destinationID();
    if (!pageID)
        return;

    WebPageProxy* pageProxy = webPage(pageID);
    if (!pageProxy)
        return;
    
    pageProxy->didReceiveMessage(connection, messageID, arguments);
}
开发者ID:,项目名称:,代码行数:45,代码来源:

示例13: setSize

void ChunkedUpdateDrawingAreaProxy::setSize(const IntSize& viewSize)
{
    WebPageProxy* page = this->page();
    if (!page->isValid())
        return;

    if (viewSize.isEmpty())
        return;

    m_viewSize = viewSize;
    m_lastSetViewSize = viewSize;

    if (m_isWaitingForDidSetFrameNotification)
        return;
    m_isWaitingForDidSetFrameNotification = true;

    page->process()->responsivenessTimer()->start();
    page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(id(), viewSize));
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例14: sizeDidChange

void TiledDrawingAreaProxy::sizeDidChange()
{
    WebPageProxy* page = this->page();
    if (!page || !page->isValid())
        return;

    if (m_size.isEmpty())
        return;

    m_viewSize = m_size;
    m_lastSetViewSize = m_size;

    if (m_isWaitingForDidSetFrameNotification)
        return;
    m_isWaitingForDidSetFrameNotification = true;

    page->process()->responsivenessTimer()->start();
    page->process()->send(DrawingAreaLegacyMessage::SetSize, page->pageID(), CoreIPC::In(m_size));
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例15: PLATFORM

DrawingAreaProxy::DrawingAreaProxy(DrawingAreaType type, WebPageProxy& webPageProxy)
    : m_type(type)
    , m_webPageProxy(webPageProxy)
    , m_size(webPageProxy.viewSize())
#if PLATFORM(MAC)
    , m_exposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::exposedRectChangedTimerFired)
#endif
{
    m_webPageProxy.process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:10,代码来源:DrawingAreaProxy.cpp


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