void WebProcessProxy::didPerformServerRedirect(uint64_t pageID, const String& sourceURLString, const String& destinationURLString, uint64_t frameID) { WebPageProxy* page = webPage(pageID); if (!page) return; if (sourceURLString.isEmpty() || destinationURLString.isEmpty()) return; WebFrameProxy* frame = webFrame(frameID); MESSAGE_CHECK(frame); MESSAGE_CHECK(frame->page() == page); MESSAGE_CHECK_URL(sourceURLString); MESSAGE_CHECK_URL(destinationURLString); m_context->historyClient().didPerformServerRedirect(&m_context.get(), page, sourceURLString, destinationURLString, frame); }
void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const IPC::DataReference& backForwardData) { MESSAGE_CHECK_URL(originalURL); MESSAGE_CHECK_URL(url); WebBackForwardListItemMap::AddResult result = m_backForwardListItemMap.add(itemID, nullptr); if (result.isNewEntry) { result.iterator->value = WebBackForwardListItem::create(originalURL, url, title, backForwardData.data(), backForwardData.size(), itemID); return; } // Update existing item. result.iterator->value->setOriginalURL(originalURL); result.iterator->value->setURL(url); result.iterator->value->setTitle(title); result.iterator->value->setBackForwardData(backForwardData.data(), backForwardData.size()); }
void WebProcessProxy::addBackForwardItem(uint64_t itemID, uint64_t pageID, const PageState& pageState) { MESSAGE_CHECK_URL(pageState.mainFrameState.originalURLString); MESSAGE_CHECK_URL(pageState.mainFrameState.urlString); auto& backForwardListItem = m_backForwardListItemMap.add(itemID, nullptr).iterator->value; if (!backForwardListItem) { BackForwardListItemState backForwardListItemState; backForwardListItemState.identifier = itemID; backForwardListItemState.pageState = pageState; backForwardListItem = WebBackForwardListItem::create(WTF::move(backForwardListItemState), pageID); return; } // Update existing item. backForwardListItem->setPageState(pageState); }
void WebProcessProxy::didUpdateHistoryTitle(uint64_t pageID, const String& title, const String& url, uint64_t frameID) { WebPageProxy* page = webPage(pageID); if (!page) return; WebFrameProxy* frame = webFrame(frameID); MESSAGE_CHECK(frame); MESSAGE_CHECK(frame->page() == page); MESSAGE_CHECK_URL(url); m_context->historyClient().didUpdateHistoryTitle(&m_context.get(), page, title, url, frame); }
void WebProcessProxy::getPluginPath(const String& mimeType, const String& urlString, String& pluginPath, uint32_t& pluginLoadPolicy) { MESSAGE_CHECK_URL(urlString); String newMimeType = mimeType.lower(); pluginLoadPolicy = PluginModuleLoadNormally; PluginModuleInfo plugin = m_context->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), urlString)); if (!plugin.path) return; pluginLoadPolicy = PluginInfoStore::policyForPlugin(plugin); if (pluginLoadPolicy != PluginModuleLoadNormally) return; pluginPath = plugin.path; }
void WebProcessProxy::getPluginPath(const String& mimeType, const String& urlString, String& pluginPath, bool& blocked) { MESSAGE_CHECK_URL(urlString); String newMimeType = mimeType.lower(); blocked = false; PluginModuleInfo plugin = m_context->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), urlString)); if (!plugin.path) return; if (m_context->pluginInfoStore().shouldBlockPlugin(plugin)) { blocked = true; return; } pluginPath = plugin.path; }