OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 Frame* frame = loadOrRedirectSubframe(ownerElement, url, frameName, lockHist
ory, lockBackForwardList); | 81 Frame* frame = loadOrRedirectSubframe(ownerElement, url, frameName, lockHist
ory, lockBackForwardList); |
82 if (!frame) | 82 if (!frame) |
83 return false; | 83 return false; |
84 | 84 |
85 if (!scriptURL.isEmpty()) | 85 if (!scriptURL.isEmpty()) |
86 frame->script()->executeIfJavaScriptURL(scriptURL); | 86 frame->script()->executeIfJavaScriptURL(scriptURL); |
87 | 87 |
88 return true; | 88 return true; |
89 } | 89 } |
| 90 |
| 91 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mime
Type) |
| 92 { |
| 93 KURL completedURL; |
| 94 if (!url.isEmpty()) |
| 95 completedURL = completeURL(url); |
| 96 bool useFallback; |
| 97 return shouldUsePlugin(completedURL, mimeType, false, useFallback); |
| 98 } |
90 | 99 |
91 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const S
tring& url, const AtomicString& frameName, | 100 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const S
tring& url, const AtomicString& frameName, |
92 const String& mimeType, const Vector<String>& paramNames, const Vector<Strin
g>& paramValues) | 101 const String& mimeType, const Vector<String>& paramNames, const Vector<Strin
g>& paramValues) |
93 { | 102 { |
94 if (url.isEmpty() && mimeType.isEmpty()) | 103 if (url.isEmpty() && mimeType.isEmpty()) |
95 return false; | 104 return false; |
96 | 105 |
97 if (!m_frame->script()->xssAuditor()->canLoadObject(url)) { | 106 if (!m_frame->script()->xssAuditor()->canLoadObject(url)) { |
98 // It is unsafe to honor the request for this object. | 107 // It is unsafe to honor the request for this object. |
99 return false; | 108 return false; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 return true; | 372 return true; |
364 } | 373 } |
365 | 374 |
366 KURL SubframeLoader::completeURL(const String& url) const | 375 KURL SubframeLoader::completeURL(const String& url) const |
367 { | 376 { |
368 ASSERT(m_frame->document()); | 377 ASSERT(m_frame->document()); |
369 return m_frame->document()->completeURL(url); | 378 return m_frame->document()->completeURL(url); |
370 } | 379 } |
371 | 380 |
372 } // namespace WebCore | 381 } // namespace WebCore |
OLD | NEW |