Commit ffa2b24e authored by jam@chromium.org's avatar jam@chromium.org

This fixes a regression with my previous fix for the installer dialog. The...

This fixes a regression with my previous fix for the installer dialog.  The plugin name was showing up blank.

TBR=ananta
Review URL: http://codereview.chromium.org/196035

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25571 0039d316-1c4b-4281-b951-d872f2087c98
parent 301a5ebc
......@@ -51,11 +51,11 @@ void PluginInstallDialog::RemoveInstaller(PluginInstallerImpl* installer) {
NOTREACHED();
}
void PluginInstallDialog::ShowInstallDialog() {
void PluginInstallDialog::ShowInstallDialog(HWND parent) {
if (IsWindow())
return;
Create(NULL, NULL);
Create(parent, NULL);
ShowWindow(SW_SHOW);
}
......
......@@ -35,7 +35,7 @@ class PluginInstallDialog : public CDialogImpl<PluginInstallDialog> {
// Lets this object know that the given installer object is going away.
void RemoveInstaller(PluginInstallerImpl* installer);
void ShowInstallDialog();
void ShowInstallDialog(HWND parent);
private:
PluginInstallDialog(const std::wstring& plugin_name);
......
......@@ -27,7 +27,7 @@ PluginInstallerImpl::PluginInstallerImpl(int16 mode)
mode_(mode),
plugin_install_stream_(NULL),
plugin_installer_state_(PluginInstallerStateUndefined),
install_dialog_(PluginInstallDialog::AddInstaller(this, plugin_name_)),
install_dialog_(NULL),
enable_click_(false),
icon_(NULL),
bold_font_(NULL),
......@@ -256,13 +256,14 @@ void PluginInstallerImpl::URLNotify(const char* url, NPReason reason) {
bool plugin_available = false;
if (reason == NPRES_DONE) {
DLOG(INFO) << "Received Done notification for plugin list download";
set_plugin_installer_state(PluginListDownloaded);
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_for_display_)) {
plugin_available = true;
install_dialog_ = PluginInstallDialog::AddInstaller(this, plugin_name_);
set_plugin_installer_state(PluginListDownloaded);
} else {
set_plugin_installer_state(PluginListDownloadedPluginNotFound);
}
......@@ -556,7 +557,7 @@ void PluginInstallerImpl::PaintUserActionInformation(HDC paint_dc,
void PluginInstallerImpl::ShowInstallDialog() {
enable_click_ = false;
install_dialog_->ShowInstallDialog();
install_dialog_->ShowInstallDialog(hwnd());
}
LRESULT PluginInstallerImpl::OnLButtonDown(UINT message, WPARAM wparam,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment