Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / renderer / pepper / pepper_pdf_host.cc
index 0d9b594..1a55636 100644 (file)
@@ -150,6 +150,8 @@ int32_t PepperPDFHost::OnResourceMessageReceived(
                                       OnHostMsgGetResourceImage)
     PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetSelectedText,
                                       OnHostMsgSetSelectedText)
+    PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SetLinkUnderCursor,
+                                      OnHostMsgSetLinkUnderCursor)
   IPC_END_MESSAGE_MAP()
   return PP_ERROR_FAILED;
 }
@@ -355,6 +357,17 @@ int32_t PepperPDFHost::OnHostMsgSetSelectedText(
   return PP_OK;
 }
 
+int32_t PepperPDFHost::OnHostMsgSetLinkUnderCursor(
+    ppapi::host::HostMessageContext* context,
+    const std::string& url) {
+  content::PepperPluginInstance* instance =
+      host_->GetPluginInstance(pp_instance());
+  if (!instance)
+    return PP_ERROR_FAILED;
+  instance->SetLinkUnderCursor(url);
+  return PP_OK;
+}
+
 // TODO(raymes): This function is mainly copied from ppb_image_data_proxy.cc.
 // It's a mess and needs to be fixed in several ways but this is better done
 // when we refactor PPB_ImageData. On success, the image handle will be