Chromium Code Reviews| Index: Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp |
| =================================================================== |
| --- Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (revision 148290) |
| +++ Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (working copy) |
| @@ -100,15 +100,6 @@ |
| namespace WebKit { |
| -// Domain for internal error codes. |
| -static const char internalErrorDomain[] = "WebKit"; |
| - |
| -// An internal error code. Used to note a policy change error resulting from |
| -// dispatchDecidePolicyForMIMEType not passing the PolicyUse option. |
| -enum { |
| - PolicyChangeError = -10000, |
| -}; |
| - |
| FrameLoaderClientImpl::FrameLoaderClientImpl(WebFrameImpl* frame) |
| : m_webFrame(frame) |
| , m_sentInitialResponseToPlugin(false) |
| @@ -759,9 +750,9 @@ |
| // delegate. See http://b/907789 for details. FIXME: This means the |
| // plugin won't receive NPP_URLNotify, which seems like it could result in |
| // a memory leak in the plugin!! |
| - if (error.domain() == internalErrorDomain |
| - && error.errorCode() == PolicyChangeError) { |
| - m_webFrame->didFail(cancelledError(error.failingURL()), true); |
| + if (error.domain() == errorDomainWebKitInternal |
| + && error.errorCode() == policyChangeError) { |
| + m_webFrame->didFail(ResourceError::createCancelledError(error.failingURL()), true); |
| return; |
| } |
| @@ -963,11 +954,6 @@ |
| (m_webFrame->frame()->loader()->policyChecker()->*function)(policyAction); |
| } |
| -void FrameLoaderClientImpl::dispatchUnableToImplementPolicy(const ResourceError& error) |
| -{ |
| - m_webFrame->client()->unableToImplementPolicyWithError(m_webFrame, error); |
| -} |
| - |
| void FrameLoaderClientImpl::dispatchWillRequestResource(CachedResourceRequest* request) |
| { |
| if (m_webFrame->client()) { |
| @@ -1053,7 +1039,7 @@ |
| // If we are sending data to MediaDocument, we should stop here |
| // and cancel the request. |
| if (m_webFrame->frame()->document()->isMediaDocument()) |
| - loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response())); |
| + loader->cancelMainResourceLoad(ResourceError::createCancelledError(loader->url())); |
| // The plugin widget could have been created in the m_webFrame->DidReceiveData |
| // function. |
| @@ -1142,67 +1128,6 @@ |
| m_webFrame->client()->didDetectXSS(m_webFrame, insecureURL, didBlockEntirePage); |
| } |
| -ResourceError FrameLoaderClientImpl::cancelledError(const ResourceRequest& request) |
| -{ |
| - if (!m_webFrame->client()) |
| - return ResourceError(); |
| - |
| - return m_webFrame->client()->cancelledError( |
| - m_webFrame, WrappedResourceRequest(request)); |
| -} |
| - |
| -ResourceError FrameLoaderClientImpl::cannotShowURLError(const ResourceRequest& request) |
| -{ |
| - if (!m_webFrame->client()) |
| - return ResourceError(); |
| - |
| - return m_webFrame->client()->cannotHandleRequestError( |
| - m_webFrame, WrappedResourceRequest(request)); |
| -} |
| - |
| -ResourceError FrameLoaderClientImpl::interruptedForPolicyChangeError( |
| - const ResourceRequest& request) |
| -{ |
| - return ResourceError(internalErrorDomain, PolicyChangeError, |
| - request.url().string(), String()); |
| -} |
| - |
| -ResourceError FrameLoaderClientImpl::cannotShowMIMETypeError(const ResourceResponse&) |
| -{ |
| - // FIXME |
| - return ResourceError(); |
| -} |
| - |
| -ResourceError FrameLoaderClientImpl::fileDoesNotExistError(const ResourceResponse&) |
| -{ |
| - // FIXME |
| - return ResourceError(); |
| -} |
| - |
| -ResourceError FrameLoaderClientImpl::pluginWillHandleLoadError(const ResourceResponse&) |
| -{ |
| - // FIXME |
| - return ResourceError(); |
| -} |
| - |
| -bool FrameLoaderClientImpl::shouldFallBack(const ResourceError& error) |
|
Nate Chapin
2013/04/15 17:44:32
This function was only called once, so it is inlin
|
| -{ |
| - // This method is called when we fail to load the URL for an <object> tag |
| - // that has fallback content (child elements) and is being loaded as a frame. |
| - // The error parameter indicates the reason for the load failure. |
| - // We should let the fallback content load only if this wasn't a cancelled |
| - // request. |
| - // Note: The mac version also has a case for "WebKitErrorPluginWillHandleLoad" |
| - ResourceError c = cancelledError(ResourceRequest()); |
| - return error.errorCode() != c.errorCode() || error.domain() != c.domain(); |
| -} |
| - |
| -bool FrameLoaderClientImpl::canHandleRequest(const ResourceRequest& request) const |
| -{ |
| - return m_webFrame->client()->canHandleRequest( |
| - m_webFrame, WrappedResourceRequest(request)); |
| -} |
| - |
| bool FrameLoaderClientImpl::canShowMIMEType(const String& mimeType) const |
| { |
| // This method is called to determine if the media type can be shown |