#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebKit.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebURLLoaderOptions.h"
-using blink::WebFrame;
+using blink::WebLocalFrame;
using blink::WebString;
using blink::WebURL;
using blink::WebURLError;
const IPC::Message& msg,
ppapi::host::HostMessageContext* context) {
IPC_BEGIN_MESSAGE_MAP(PepperURLLoaderHost, msg)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(
- PpapiHostMsg_URLLoader_Open,
- OnHostMsgOpen)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(
- PpapiHostMsg_URLLoader_SetDeferLoading,
- OnHostMsgSetDeferLoading)
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(
- PpapiHostMsg_URLLoader_Close,
- OnHostMsgClose);
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(
- PpapiHostMsg_URLLoader_GrantUniversalAccess,
- OnHostMsgGrantUniversalAccess)
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_URLLoader_Open, OnHostMsgOpen)
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_URLLoader_SetDeferLoading,
+ OnHostMsgSetDeferLoading)
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_URLLoader_Close,
+ OnHostMsgClose);
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(
+ PpapiHostMsg_URLLoader_GrantUniversalAccess,
+ OnHostMsgGrantUniversalAccess)
IPC_END_MESSAGE_MAP()
return PP_ERROR_FAILED;
}
}
void PepperURLLoaderHost::didFail(WebURLLoader* loader,
- const WebURLError& error) {
+ const WebURLError& error) {
// Note that |loader| will be NULL for document loads.
int32_t pp_error = PP_ERROR_FAILED;
if (error.domain.equals(WebString::fromUTF8(net::kErrorDomain))) {
if (URLRequestRequiresUniversalAccess(filled_in_request_data) &&
!has_universal_access_) {
ppapi::PpapiGlobals::Get()->LogWithSource(
- pp_instance(), PP_LOGLEVEL_ERROR, std::string(),
+ pp_instance(),
+ PP_LOGLEVEL_ERROR,
+ std::string(),
"PPB_URLLoader.Open: The URL you're requesting is "
" on a different security origin than your plugin. To request "
" cross-origin resources, see "
if (loader_.get())
return PP_ERROR_INPROGRESS;
- WebFrame* frame = GetFrame();
+ WebLocalFrame* frame = GetFrame();
if (!frame)
return PP_ERROR_FAILED;
WebURLRequest web_request;
- if (!CreateWebURLRequest(pp_instance(),
- &filled_in_request_data,
- frame,
- &web_request)) {
+ if (!CreateWebURLRequest(
+ pp_instance(), &filled_in_request_data, frame, &web_request)) {
return PP_ERROR_FAILED;
}
GetFrame()->stopLoading();
}
-blink::WebFrame* PepperURLLoaderHost::GetFrame() {
+blink::WebLocalFrame* PepperURLLoaderHost::GetFrame() {
PepperPluginInstance* instance_object =
renderer_ppapi_host_->GetPluginInstance(pp_instance());
if (!instance_object)
pp_instance(),
response,
base::Bind(&PepperURLLoaderHost::DidDataFromWebURLResponse,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr()));
}
}
// flag.
ppapi::proxy::ResourceMessageReplyParams params;
SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress(
- record_upload ? bytes_sent_ : -1,
- record_upload ? total_bytes_to_be_sent_ : -1,
- record_download ? bytes_received_ : -1,
- record_download ? total_bytes_to_be_received_ : -1));
+ record_upload ? bytes_sent_ : -1,
+ record_upload ? total_bytes_to_be_sent_ : -1,
+ record_download ? bytes_received_ : -1,
+ record_download ? total_bytes_to_be_received_ : -1));
}
}