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

Side by Side Diff: Source/core/html/HTMLPlugInImageElement.cpp

Issue 21929002: Remove unused, unimplemented and no-op methods from MIMETypeRegistry. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/platform/MIMETypeRegistry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // If the plug-in element already contains a subframe, loadOrRedirectSubfram e will re-use it. Otherwise, 237 // If the plug-in element already contains a subframe, loadOrRedirectSubfram e will re-use it. Otherwise,
238 // it will create a new frame and set it as the RenderPart's widget, causing what was previously 238 // it will create a new frame and set it as the RenderPart's widget, causing what was previously
239 // in the widget to be torn down. 239 // in the widget to be torn down.
240 return loadOrRedirectSubframe(completedURL, getNameAttribute(), true); 240 return loadOrRedirectSubframe(completedURL, getNameAttribute(), true);
241 } 241 }
242 242
243 bool HTMLPlugInImageElement::loadPlugin(const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFa llback) 243 bool HTMLPlugInImageElement::loadPlugin(const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFa llback)
244 { 244 {
245 Frame* frame = document()->frame(); 245 Frame* frame = document()->frame();
246 246
247 // Application plug-ins are plug-ins implemented by the user agent, for exam ple Qt plug-ins, 247 if (!frame->loader()->allowPlugins(AboutToInstantiatePlugin))
248 // as opposed to third-party code such as Flash. The user agent decides whet her or not they are
249 // permitted, rather than WebKit.
250 if (!frame->loader()->allowPlugins(AboutToInstantiatePlugin) && !MIMETypeReg istry::isApplicationPluginMIMEType(mimeType))
251 return false; 248 return false;
252 249
253 if (!pluginIsLoadable(url, mimeType)) 250 if (!pluginIsLoadable(url, mimeType))
254 return false; 251 return false;
255 252
256 RenderEmbeddedObject* renderer = renderEmbeddedObject(); 253 RenderEmbeddedObject* renderer = renderEmbeddedObject();
257 254
258 // FIXME: This code should not depend on renderer! 255 // FIXME: This code should not depend on renderer!
259 if (!renderer || useFallback) 256 if (!renderer || useFallback)
260 return false; 257 return false;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy); 323 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy);
327 return false; 324 return false;
328 } 325 }
329 326
330 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document()->securityOrigin(), url)) 327 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document()->securityOrigin(), url))
331 return false; 328 return false;
332 return true; 329 return true;
333 } 330 }
334 331
335 } // namespace WebCore 332 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/platform/MIMETypeRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698