void WebProcess::handleInjectedBundleMessage(const String& messageName, const UserData& messageBody) { InjectedBundle* injectedBundle = WebProcess::singleton().injectedBundle(); if (!injectedBundle) return; injectedBundle->didReceiveMessage(messageName, transformHandlesToObjects(messageBody.object()).get()); }
void WebProcess::setInjectedBundleParameter(const String& key, const IPC::DataReference& value) { InjectedBundle* injectedBundle = WebProcess::singleton().injectedBundle(); if (!injectedBundle) return; injectedBundle->setBundleParameter(key, value); }
void WebProcess::postInjectedBundleMessage(const CoreIPC::DataReference& messageData) { InjectedBundle* injectedBundle = WebProcess::shared().injectedBundle(); if (!injectedBundle) return; OwnPtr<CoreIPC::ArgumentDecoder> decoder = CoreIPC::ArgumentDecoder::create(messageData.data(), messageData.size()); String messageName; if (!decoder->decode(messageName)) return; RefPtr<APIObject> messageBody; InjectedBundleUserMessageDecoder messageBodyDecoder(messageBody); if (!decoder->decode(messageBodyDecoder)) return; injectedBundle->didReceiveMessage(messageName, messageBody.get()); }