Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(773)

Unified Diff: Source/core/loader/SubframeLoader.cpp

Issue 20858002: Merge SubframeLoader::createJavaAppletWidget into HTMLAppletElement::udpateWidget (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: const KURL& - > KURL Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/SubframeLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/SubframeLoader.cpp
diff --git a/Source/core/loader/SubframeLoader.cpp b/Source/core/loader/SubframeLoader.cpp
index 45cc5fb37cb96f62283d88c26b8a6be138347cf6..0079a69c7ef4da75ba49bd4c28e4e9627c41afcd 100644
--- a/Source/core/loader/SubframeLoader.cpp
+++ b/Source/core/loader/SubframeLoader.cpp
@@ -151,51 +151,6 @@ bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const S
return loadOrRedirectSubframe(ownerElement, completedURL, frameName, true);
}
-PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const Vector<String>& paramNames, const Vector<String>& paramValues)
-{
- String baseURLString;
- String codeBaseURLString;
-
- for (size_t i = 0; i < paramNames.size(); ++i) {
- if (equalIgnoringCase(paramNames[i], "baseurl"))
- baseURLString = paramValues[i];
- else if (equalIgnoringCase(paramNames[i], "codebase"))
- codeBaseURLString = paramValues[i];
- }
-
- if (!codeBaseURLString.isEmpty()) {
- KURL codeBaseURL = completeURL(codeBaseURLString);
- if (!element->document()->securityOrigin()->canDisplay(codeBaseURL)) {
- FrameLoader::reportLocalLoadFailed(m_frame, codeBaseURL.string());
- return 0;
- }
-
- const char javaAppletMimeType[] = "application/x-java-applet";
- if (!element->document()->contentSecurityPolicy()->allowObjectFromSource(codeBaseURL)
- || !element->document()->contentSecurityPolicy()->allowPluginType(javaAppletMimeType, javaAppletMimeType, codeBaseURL))
- return 0;
- }
-
- if (baseURLString.isEmpty())
- baseURLString = m_frame->document()->baseURL().string();
- KURL baseURL = completeURL(baseURLString);
-
- RefPtr<Widget> widget;
- if (m_frame->loader()->allowPlugins(AboutToInstantiatePlugin))
- widget = m_frame->loader()->client()->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
-
- if (!widget) {
- RenderEmbeddedObject* renderer = element->renderEmbeddedObject();
-
- if (!renderer->showsUnavailablePluginIndicator())
- renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginMissing);
- return 0;
- }
-
- m_frame->loader()->setContainsPlugins();
- return widget;
-}
-
bool SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement* ownerElement, const KURL& url, const AtomicString& frameName, bool lockBackForwardList)
{
if (Frame* frame = ownerElement->contentFrame()) {
« no previous file with comments | « Source/core/loader/SubframeLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698