Changeset 30203 in webkit
- Timestamp:
- Feb 13, 2008 9:28:37 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r30202 r30203 1 2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com> 2 3 Fix Bug 17220: Illogical dependency between PluginView and 4 PluginDatabase 5 6 <http://bugs.webkit.org/show_bug.cgi?id=17220> 7 8 Reviewed by Adam and Darin. 9 10 Rename PluginDatabase::createPluginView to PluginView::create, to make 11 the illogical dependency between the two, logical 12 Make PluginDatabase::findPlugin a public method 13 Update the includes in PluginView and PluginDatabase for the change 14 15 * plugins/PluginDatabase.h: 16 * plugins/PluginView.h: 17 * plugins/win/PluginDatabaseWin.cpp: 18 * plugins/win/PluginViewWin.cpp: 19 1 20 2008-02-13 Adam Roben <aroben@apple.com> 2 21 -
trunk/WebCore/plugins/PluginDatabase.h
r30015 r30203 47 47 public: 48 48 static PluginDatabase* installedPlugins(); 49 PluginView* createPluginView(Frame* parentFrame, const IntSize&, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);50 49 51 50 bool refresh(); … … 53 52 bool isMIMETypeRegistered(const String& mimeType); 54 53 void addExtraPluginPath(const String&); 54 55 PluginPackage* findPlugin(const KURL&, String& mimeType); 55 56 private: 56 57 void setPluginPaths(const Vector<String>& paths) { m_pluginPaths = paths; } 57 58 PluginSet getPluginsInPaths() const; 58 59 59 PluginPackage* findPlugin(const KURL& url, String& mimeType);60 60 PluginPackage* pluginForMIMEType(const String& mimeType); 61 61 String MIMETypeForExtension(const String& extension) const; -
trunk/WebCore/plugins/PluginView.h
r30015 r30203 77 77 78 78 public: 79 PluginView(Frame* parentFrame, const IntSize&, PluginPackage* plugin, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);79 static PluginView* create(Frame* parentFrame, const IntSize&, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually); 80 80 virtual ~PluginView(); 81 81 … … 139 139 140 140 private: 141 PluginView(Frame* parentFrame, const IntSize&, PluginPackage*, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually); 142 141 143 void setParameters(const Vector<String>& paramNames, const Vector<String>& paramValues); 142 144 void init(); -
trunk/WebCore/plugins/win/PluginDatabaseWin.cpp
r30015 r30203 27 27 #include "PluginDatabase.h" 28 28 29 #include "KURL.h" 30 #include "Frame.h" 29 31 #include "PluginPackage.h" 30 #include "PluginView.h"31 #include "Frame.h"32 32 #include <windows.h> 33 33 #include <shlwapi.h> … … 522 522 } 523 523 524 PluginView* PluginDatabase::createPluginView(Frame* parentFrame, const IntSize& size, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 525 { 526 // if we fail to find a plugin for this MIME type, findPlugin will search for 527 // a plugin by the file extension and update the MIME type, so pass a mutable String 528 String mimeTypeCopy = mimeType; 529 PluginPackage* plugin = findPlugin(url, mimeTypeCopy); 530 531 // No plugin was found, try refreshing the database and searching again 532 if (!plugin && refresh()) { 533 mimeTypeCopy = mimeType; 534 plugin = findPlugin(url, mimeTypeCopy); 535 } 536 537 return new PluginView(parentFrame, size, plugin, element, url, paramNames, paramValues, mimeTypeCopy, loadManually); 538 } 539 540 } 524 } -
trunk/WebCore/plugins/win/PluginViewWin.cpp
r30015 r30203 52 52 #include "kjs_proxy.h" 53 53 #include "kjs_window.h" 54 #include "PluginDatabase.h" 54 55 #include "PluginDebug.h" 55 56 #include "PluginPackage.h" … … 1701 1702 } 1702 1703 1704 PluginView* PluginView::create(Frame* parentFrame, const IntSize& size, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 1705 { 1706 // if we fail to find a plugin for this MIME type, findPlugin will search for 1707 // a plugin by the file extension and update the MIME type, so pass a mutable String 1708 String mimeTypeCopy = mimeType; 1709 PluginPackage* plugin = PluginDatabase::installedPlugins()->findPlugin(url, mimeTypeCopy); 1710 1711 // No plugin was found, try refreshing the database and searching again 1712 if (!plugin && PluginDatabase::installedPlugins()->refresh()) { 1713 mimeTypeCopy = mimeType; 1714 plugin = PluginDatabase::installedPlugins()->findPlugin(url, mimeTypeCopy); 1715 } 1716 1717 return new PluginView(parentFrame, size, plugin, element, url, paramNames, paramValues, mimeTypeCopy, loadManually); 1718 } 1719 1703 1720 } // namespace WebCore -
trunk/WebKit/win/ChangeLog
r30202 r30203 1 2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com> 2 3 Fix Bug 17220: Illogical dependency between PluginView and 4 PluginDatabase 5 6 <http://bugs.webkit.org/show_bug.cgi?id=17220> 7 8 Reviewed by Adam and Darin. 9 10 Update for the rename of PluginDatabase::createPluginView 11 to PluginView::create 12 13 * WebFrame.cpp: 14 1 15 2008-02-13 Adam Roben <aroben@apple.com> 2 16 … … 162 176 Add stub. 163 177 178 164 179 2008-02-07 Ada Chan <adachan@apple.com> 165 180 -
trunk/WebKit/win/WebFrame.cpp
r30180 r30203 2334 2334 Widget* WebFrame::createPlugin(const IntSize& pluginSize, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 2335 2335 { 2336 PluginView* pluginView = Plugin Database::installedPlugins()->createPluginView(core(this), pluginSize, element, url, paramNames, paramValues, mimeType, loadManually);2336 PluginView* pluginView = PluginView::create(core(this), pluginSize, element, url, paramNames, paramValues, mimeType, loadManually); 2337 2337 2338 2338 if (pluginView->status() == PluginStatusLoadedSuccessfully) … … 2404 2404 Widget* WebFrame::createJavaAppletWidget(const IntSize& pluginSize, Element* element, const KURL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues) 2405 2405 { 2406 PluginView* pluginView = PluginDatabase::installedPlugins()-> 2407 createPluginView(core(this), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false); 2406 PluginView* pluginView = PluginView::create(core(this), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false); 2408 2407 2409 2408 // Check if the plugin can be loaded successfully
Note: See TracChangeset
for help on using the changeset viewer.