diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-31 00:09:55 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-31 00:09:55 +0000 |
commit | 062ca55c85775389f8051d92e3de2aee18690a71 (patch) | |
tree | e1e40dd477524c1caf5e38cda646e85c1327d648 /webkit/default_plugin | |
parent | f86cdcc5174e672ce40f229c2a0a3f75c250db18 (diff) | |
download | chromium_src-062ca55c85775389f8051d92e3de2aee18690a71.zip chromium_src-062ca55c85775389f8051d92e3de2aee18690a71.tar.gz chromium_src-062ca55c85775389f8051d92e3de2aee18690a71.tar.bz2 |
This fixes http://code.google.com/p/chromium/issues/detail?id=3769, which
is to allow users to download the java plugin via our plugin installer.
The plugin installer currently supports URLs which point to executable files.
However the java runtime path is timed and changes frequently. As a stop gap
fix for this, I added a facility in the plugin installer which indicates if
a URL is a display URL. If yes then we navigate to this URL in a new tab,
and allow the user to download the plugin from there.
The format of the chrome_plugins_file.xml has been changed to have each plugin
node specify a list of mime types. This reduces a great deal of duplicated
information in the plugins file.
Changed the plugin finder URL to http://dl.google.com/chrome/plugins/plugins2.xml
to ensure that older clients continue to work.
Bug=3769
R=jam
Review URL: http://codereview.chromium.org/8729
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/default_plugin')
-rw-r--r-- | webkit/default_plugin/chrome_plugins_file.xml | 626 | ||||
-rw-r--r-- | webkit/default_plugin/plugin_database_handler.cc | 56 | ||||
-rw-r--r-- | webkit/default_plugin/plugin_database_handler.h | 20 | ||||
-rw-r--r-- | webkit/default_plugin/plugin_impl.cc | 18 | ||||
-rw-r--r-- | webkit/default_plugin/plugin_impl.h | 2 |
5 files changed, 86 insertions, 636 deletions
diff --git a/webkit/default_plugin/chrome_plugins_file.xml b/webkit/default_plugin/chrome_plugins_file.xml index 0a931a4..0f5c29f 100644 --- a/webkit/default_plugin/chrome_plugins_file.xml +++ b/webkit/default_plugin/chrome_plugins_file.xml @@ -1,653 +1,45 @@ <plugins> <plugin> - <mime>application/x-java-applet</mime> + <mime_types>application/x-java-applet;application/x-java-bean;application/x-java-vm;application/x-java-applet,version=1.1.1;application/x-java-bean,version=1.1.1;application/x-java-applet,version=1.1;application/x-java-bean,version=1.1;application/x-java-applet,version=1.2;application/x-java-bean,version=1.2;application/x-java-applet,version=1.1.3;application/x-java-bean,version=1.1.3;application/x-java-applet,version=1.1.2;application/x-java-bean,version=1.1.2;application/x-java-applet,version=1.3;application/x-java-bean,version=1.3;application/x-java-applet,version=1.2.2;application/x-java-bean,version=1.2.2;application/x-java-applet,version=1.2.1;application/x-java-bean,version=1.2.1;application/x-java-applet,version=1.3.1;application/x-java-bean,version=1.3.1;application/x-java-applet,version=1.4;application/x-java-bean,version=1.4;application/x-java-applet,version=1.4.1;application/x-java-bean,version=1.4.1;application/x-java-applet,version=1.4.2;application/x-java-bean,version=1.4.2;application/x-java-applet,version=1.5;application/x-java-bean,version=1.5;application/x-java-applet,version=1.6;application/x-java-bean,version=1.6;</mime_types> <lang>en-us</lang> <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-vm</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.1.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.1.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.1.3</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.1.3</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.1.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.1.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.3</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.3</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.2.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> + <url>http://java.com/en/download/</url> + <displayurl>1</displayurl> </plugin> <plugin> - <mime>application/x-java-bean,version=1.2.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.2.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.2.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.3.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.3.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.4</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.4</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.4.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.4.1</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.4.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.4.2</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.5</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.5</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-applet,version=1.6</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>application/x-java-bean,version=1.6</mime> - <lang>en-us</lang> - <name>Java(TM) Platform SE6 U10 (Beta)</name> - <url>http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jre-6u10-windows-i586-p-iftw.exe?BundledLineItemUUID=SaZIBe.pogoAAAEdJF9iLEAI&OrderID=OItIBe.p30UAAAEdEF9iLEAI&ProductID=PLNIBe.npD0AAAEbpuoKz7Lc&FileName=/jre-6u10-windows-i586-p-iftw.exe</url> - </plugin> - - <plugin> - <mime>audio/x-pn-realaudio-plugin</mime> + <mime_types>audio/x-pn-realaudio-plugin;audio/x-pn-realaudio;audio/vnd.rn-realaudio;video/vnd.rn-realvideo</mime_types> <lang>en-us</lang> <name>Real player</name> <url>http://software-dl.real.com/free/windows/installer/R41R02F/RealPlayer11GOLD.exe</url> </plugin> <plugin> - <mime>audio/x-pn-realaudio</mime> - <lang>en-us</lang> - <name>Real player</name> - <url>http://software-dl.real.com/free/windows/installer/R41R02F/RealPlayer11GOLD.exe</url> - </plugin> - - <plugin> - <mime>audio/vnd.rn-realaudio</mime> - <lang>en-us</lang> - <name>Real player</name> - <url>http://software-dl.real.com/free/windows/installer/R41R02F/RealPlayer11GOLD.exe</url> - </plugin> - - <plugin> - <mime>video/vnd.rn-realvideo</mime> - <lang>en-us</lang> - <name>Real player</name> - <url>http://software-dl.real.com/free/windows/installer/R41R02F/RealPlayer11GOLD.exe</url> - </plugin> - - <plugin> - <mime>application/x-shockwave-flash</mime> + <mime_types>application/x-shockwave-flash;application/futuresplash</mime_types> <lang>en-us</lang> <name>Adobe Flash Movie</name> <url>http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe</url> </plugin> <plugin> - <mime>application/futuresplash</mime> - <lang>en-us</lang> - <name>Adobe FutureSpash Movie</name> - <url>http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe</url> - </plugin> - - <plugin> - <mime>application/x-director</mime> + <mime_types>application/x-director</mime_types> <lang>en-us</lang> <name>Adobe Shockwave Movie</name> <url>http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/10.2.0.023/Shockwave_Installer_Slim.exe</url> </plugin> <plugin> - <mime>application/pdf</mime> - <lang>en-us</lang> - <name>Adobe Acrobat</name> - <url>http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.1.2/enu/AdbeRdr812_en_US.exe</url> - </plugin> - - <plugin> - <mime>application/vnd.adobe.x-mars</mime> + <mime_types>application/pdf;application/vnd.adobe.x-mars;application/vnd.fdf;application/vnd.adobe.xfdf;application/vnd.adobe.xdp+xml;application/vnd.adobe.xfd+xml;</mime_types> <lang>en-us</lang> <name>Adobe Acrobat</name> <url>http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.1.2/enu/AdbeRdr812_en_US.exe</url> </plugin> <plugin> - <mime>application/vnd.fdf</mime> - <lang>en-us</lang> - <name>Adobe Acrobat</name> - <url>http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.1.2/enu/AdbeRdr812_en_US.exe</url> - </plugin> - - <plugin> - <mime>application/vnd.adobe.xfdf</mime> - <lang>en-us</lang> - <name>Adobe Acrobat</name> - <url>http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.1.2/enu/AdbeRdr812_en_US.exe</url> - </plugin> - - <plugin> - <mime>application/vnd.adobe.xdp+xml</mime> - <lang>en-us</lang> - <name>Adobe Acrobat</name> - <url>http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.1.2/enu/AdbeRdr812_en_US.exe</url> - </plugin> - - <plugin> - <mime>application/vnd.adobe.xfd+xml</mime> - <lang>en-us</lang> - <name>Adobe Acrobat</name> - <url>http://ardownload.adobe.com/pub/adobe/reader/win/8.x/8.1.2/enu/AdbeRdr812_en_US.exe</url> - </plugin> - - <plugin> - <mime>video/quicktime</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>application/sdp</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>application/x-sdp</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>application/x-rtsp</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/flc</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-wav</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/wav</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/aiff</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-aiff</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/basic</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/mid</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-midi</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/midi</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/vnd.qcelp</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-gsm</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/amr</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/aac</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-aac</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-caf</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/ac3</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-ac3</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/x-mpeg</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/mpeg</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/mpeg</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-mpeg</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/3ggp</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/3ggp</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/3ggp2</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/3ggp2</mime> + <mime_types>video/quicktime;application/sdp;application/x-sdp;application/x-rtsp;video/flc;audio/x-wav;audio/wav;audio/aiff;audio/x-aiff;audio/basic;audio/mid;audio/x-midi;audio/midi;audio/vnd.qcelp;audio/x-gsm;audio/amr;audio/aac;audio/x-aac;audio/x-caf;audio/ac3;audio/x-ac3;video/x-mpeg;video/mpeg;audio/mpeg;audio/x-mpeg;video/3ggp;audio/3ggp;video/3ggp2;audio/3ggp2;video/sd-video;application/x-mpeg;video/mp4;audio/mp4;audio/x-m4a;audio/x-m4p;audio/x-m4b;video/x-m4v;image/x-macpaint;image/pict;image/x-pict;image/png;image/x-png;image/x-quicktime;image/x-sgi;image/x-targa;image/jp2;image/jpeg2000;image/jpeg2000-image;image/x-jpeg2000-image</mime_types> <lang>en-us</lang> <name>Quicktime player</name> <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> </plugin> - - <plugin> - <mime>video/sd-video</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>application/x-mpeg</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/mp4</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/mp4</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-m4a</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-m4p</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>audio/x-m4b</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>video/x-m4v</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-macpaint</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/pict</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-pict</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/png</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-png</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-quicktime</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-sgi</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-targa</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/jp2</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/jpeg2000</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/jpeg2000-image</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - - <plugin> - <mime>image/x-jpeg2000-image</mime> - <lang>en-us</lang> - <name>Quicktime player</name> - <url>http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=19502&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe</url> - </plugin> - + </plugins>
\ No newline at end of file diff --git a/webkit/default_plugin/plugin_database_handler.cc b/webkit/default_plugin/plugin_database_handler.cc index 2a1ed26..68126fa 100644 --- a/webkit/default_plugin/plugin_database_handler.cc +++ b/webkit/default_plugin/plugin_database_handler.cc @@ -214,8 +214,10 @@ bool PluginDatabaseHandler::ParsePluginList() { bool PluginDatabaseHandler::GetPluginDetailsForMimeType( const char* mime_type, const char* language, - std::string* download_url, std::wstring* plugin_name) { - if (!mime_type || !language || !download_url || !plugin_name) { + std::string* download_url, std::wstring* plugin_name, + bool* download_url_for_display) { + if (!mime_type || !language || !download_url || !plugin_name || + !download_url_for_display) { NOTREACHED(); return false; } @@ -224,12 +226,19 @@ bool PluginDatabaseHandler::GetPluginDetailsForMimeType( for (plugin_index = downloaded_plugins_list_.begin(); plugin_index != downloaded_plugins_list_.end(); ++plugin_index) { - const PluginDetail& current_plugin = *plugin_index; - if ((0 == lstrcmpiA(mime_type, current_plugin.mime_type.c_str())) && - (0 == lstrcmpiA(language, current_plugin.language.c_str()))) { - *download_url = current_plugin.download_url; - *plugin_name = current_plugin.display_name; - return true; + PluginDetail& current_plugin = *plugin_index; + + std::vector<std::string>::iterator mime_type_index; + for (mime_type_index = current_plugin.mime_types.begin(); + mime_type_index != current_plugin.mime_types.end(); + ++mime_type_index) { + if ((0 == lstrcmpiA(mime_type, (*mime_type_index).c_str())) && + (0 == lstrcmpiA(language, current_plugin.language.c_str()))) { + *download_url = current_plugin.download_url; + *plugin_name = current_plugin.display_name; + *download_url_for_display = current_plugin.download_url_for_display; + return true; + } } } return false; @@ -248,6 +257,8 @@ void PluginDatabaseHandler::Close(bool delete_file) { bool PluginDatabaseHandler::ReadPluginInfo(_xmlNode* plugin_node, PluginDetail* plugin_detail) { + static const char kMimeTypeSeparator = ';'; + if (!plugin_node) { NOTREACHED(); return false; @@ -260,9 +271,8 @@ bool PluginDatabaseHandler::ReadPluginInfo(_xmlNode* plugin_node, NOTREACHED(); return false; } - - _xmlNode* plugin_mime_type_val = plugin_mime_type->children; - if (plugin_mime_type_val == NULL) { + _xmlNode* plugin_mime_type_vals = plugin_mime_type->children; + if (plugin_mime_type_vals == NULL) { DLOG(WARNING) << "Invalid mime type"; NOTREACHED(); return false; @@ -308,12 +318,32 @@ bool PluginDatabaseHandler::ReadPluginInfo(_xmlNode* plugin_node, return false; } + // Look for the DisplayUrl node. By default every URL is treated as an + // executable URL. + plugin_detail->download_url_for_display = false; + + _xmlNode* plugin_download_url_for_display_node = + plugin_download_url_node->next->next; + if (plugin_download_url_for_display_node) { + _xmlNode* url_for_display_val = + plugin_download_url_for_display_node->children; + if (url_for_display_val) { + int url_for_display = 0; + StringToInt(reinterpret_cast<const char*>(url_for_display_val->content), + &url_for_display); + if (url_for_display != 0) + plugin_detail->download_url_for_display = true; + } + } + plugin_detail->display_name = UTF8ToWide(reinterpret_cast<const char*>(plugin_name_val->content)); plugin_detail->download_url = reinterpret_cast<const char*>(plugin_download_url_val->content); - plugin_detail->mime_type = - reinterpret_cast<const char*>(plugin_mime_type_val->content); + + SplitString(reinterpret_cast<const char*>(plugin_mime_type_vals->content), + kMimeTypeSeparator, &plugin_detail->mime_types); + plugin_detail->language = reinterpret_cast<const char*>(plugin_lang_val->content); diff --git a/webkit/default_plugin/plugin_database_handler.h b/webkit/default_plugin/plugin_database_handler.h index 684cae0..5112d83 100644 --- a/webkit/default_plugin/plugin_database_handler.h +++ b/webkit/default_plugin/plugin_database_handler.h @@ -14,10 +14,17 @@ // Individual plugin details struct PluginDetail { - std::string mime_type; + // List of mime types supported by the plugin. + std::vector<std::string> mime_types; + // The URL where the plugin can be downloaded from. std::string download_url; + // The display name for the plugin. std::wstring display_name; + // Language of the plugin installer. (en-us, etc). std::string language; + // Indicates if the download URL points to an exe or to a URL which + // needs to be displayed in a tab. + bool download_url_for_display; }; typedef std::vector<PluginDetail> PluginList; @@ -31,9 +38,12 @@ struct _xmlNode; // The format of the plugins databse file is as below:- // <plugins> // <plugin> -// <mime> </mime> (Mime type of the plugin) +// <mime_types> </mime_types> (semicolon separated list of mime types +// supported by the plugin) // <lang> </lang> (Supported language) // <url> </url> (Link to the plugin installer) +// <displayurl> 0 </displayurl> (Indicates if the URL is a display URL. +// defaults to 0. // </plugin> // <plugin> // </plugins> @@ -90,11 +100,15 @@ class PluginDatabaseHandler { // display_name // Output parameter which contains the display name of the plugin on // success. + // download_url_for_display + // Output parameter which indicates if the plugin URL points to an exe + // or not. // Returns true if the plugin details were found. bool GetPluginDetailsForMimeType(const char* mime_type, const char* language, std::string* download_url, - std::wstring* display_name); + std::wstring* display_name, + bool* download_url_for_display); // Closes the handle to the plugin database file. // diff --git a/webkit/default_plugin/plugin_impl.cc b/webkit/default_plugin/plugin_impl.cc index 1f77a8f..125599e 100644 --- a/webkit/default_plugin/plugin_impl.cc +++ b/webkit/default_plugin/plugin_impl.cc @@ -40,7 +40,8 @@ PluginInstallerImpl::PluginInstallerImpl(int16 mode) underline_font_(NULL), tooltip_(NULL), activex_installer_(NULL), - plugin_database_handler_(*this) { + plugin_database_handler_(*this), + plugin_download_url_for_display_(false) { } PluginInstallerImpl::~PluginInstallerImpl() { @@ -253,7 +254,8 @@ void PluginInstallerImpl::URLNotify(const char* url, NPReason reason) { plugin_database_handler_.ParsePluginList(); if (plugin_database_handler_.GetPluginDetailsForMimeType( mime_type_.c_str(), desired_language_.c_str(), - &plugin_download_url_, &plugin_name_)) { + &plugin_download_url_, &plugin_name_, + &plugin_download_url_for_display_)) { plugin_available = true; } else { set_plugin_installer_state(PluginListDownloadedPluginNotFound); @@ -361,7 +363,17 @@ void PluginInstallerImpl::DownloadPlugin() { activex_installer_->StartDownload(activex_clsid_, activex_codebase_, m_hWnd, kActivexInstallResult); } else { - webkit_glue::DownloadUrl(plugin_download_url_, m_hWnd); + if (!plugin_download_url_for_display_) { + webkit_glue::DownloadUrl(plugin_download_url_, m_hWnd); + } else { + default_plugin::g_browser->geturl(instance(), + plugin_download_url_.c_str(), + "_blank"); + set_plugin_installer_state(PluginInstallerLaunchSuccess); + DisplayStatus(IDS_DEFAULT_PLUGIN_REFRESH_PLUGIN_MSG); + enable_click_ = true; + RefreshDisplay(); + } } } diff --git a/webkit/default_plugin/plugin_impl.h b/webkit/default_plugin/plugin_impl.h index 76bf65c..8da77cb 100644 --- a/webkit/default_plugin/plugin_impl.h +++ b/webkit/default_plugin/plugin_impl.h @@ -337,6 +337,8 @@ class PluginInstallerImpl : public CWindowImpl<PluginInstallerImpl> { std::wstring plugin_name_; // The actual download URL. std::string plugin_download_url_; + // Indicates if the plugin download URL points to an exe. + bool plugin_download_url_for_display_; // The current state of the plugin installer. PluginInstallerState plugin_installer_state_; // Used to display the UI for plugin installation. |