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/plugin_database_handler.h | |
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/plugin_database_handler.h')
-rw-r--r-- | webkit/default_plugin/plugin_database_handler.h | 20 |
1 files changed, 17 insertions, 3 deletions
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. // |