Chromium Code Reviews| Index: chrome/browser/plugin_installer_infobar_delegate.cc |
| =================================================================== |
| --- chrome/browser/plugin_installer_infobar_delegate.cc (revision 98657) |
| +++ chrome/browser/plugin_installer_infobar_delegate.cc (working copy) |
| @@ -13,11 +13,13 @@ |
| #include "grit/theme_resources_standard.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "webkit/plugins/npapi/default_plugin_shared.h" |
| PluginInstallerInfoBarDelegate::PluginInstallerInfoBarDelegate( |
| - TabContents* tab_contents) |
| + TabContents* tab_contents, int window) |
| : ConfirmInfoBarDelegate(tab_contents), |
| - tab_contents_(tab_contents) { |
| + tab_contents_(tab_contents), |
| + window_(window) { |
| } |
| PluginInstallerInfoBarDelegate::~PluginInstallerInfoBarDelegate() { |
| @@ -48,8 +50,18 @@ |
| } |
| bool PluginInstallerInfoBarDelegate::Accept() { |
| - RenderViewHost* host = tab_contents_->render_view_host(); |
| - host->Send(new ViewMsg_InstallMissingPlugin(host->routing_id())); |
| + // TODO(PORT) for other platforms. |
| +#ifdef OS_WIN |
| + unsigned long result = 0; |
| + ::SendMessageTimeout( |
|
jam
2011/08/31 17:34:42
why send a message with a timeout of 50ms (which i
ananta
2011/08/31 20:18:14
Done. Dumb error.
|
| + reinterpret_cast<HWND>(window_), |
| + webkit::npapi::default_plugin::kInstallMissingPluginMessage, |
| + 0, |
| + 0, |
| + SMTO_ABORTIFHUNG, |
| + 50, |
| + &result); |
| +#endif // OS_WIN |
| return true; |
| } |