Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: webkit/default_plugin/plugin_impl.cc

Issue 10650: Pass in SW_SHOW to ShellExecuteEx as the plugin installers can rely on this... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/default_plugin/plugin_impl.h" 5 #include "webkit/default_plugin/plugin_impl.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 DLOG(WARNING) << "Failed to download plugin"; 611 DLOG(WARNING) << "Failed to download plugin";
612 set_plugin_installer_state(PluginDownloadFailed); 612 set_plugin_installer_state(PluginDownloadFailed);
613 DisplayPluginDownloadFailedStatus(); 613 DisplayPluginDownloadFailedStatus();
614 } else { 614 } else {
615 DLOG(INFO) << "Successfully downloaded plugin installer"; 615 DLOG(INFO) << "Successfully downloaded plugin installer";
616 set_plugin_installer_state(PluginDownloadCompleted); 616 set_plugin_installer_state(PluginDownloadCompleted);
617 617
618 std::wstring file_path = 618 std::wstring file_path =
619 reinterpret_cast<const wchar_t*>(download_file_info->lpData); 619 reinterpret_cast<const wchar_t*>(download_file_info->lpData);
620 620
621 std::wstring current_directory =
622 file_util::GetDirectoryFromPath(file_path);
623
621 SHELLEXECUTEINFO shell_execute_info = {0}; 624 SHELLEXECUTEINFO shell_execute_info = {0};
622 shell_execute_info.cbSize = sizeof(shell_execute_info); 625 shell_execute_info.cbSize = sizeof(shell_execute_info);
623 shell_execute_info.fMask = SEE_MASK_NOCLOSEPROCESS; 626 shell_execute_info.fMask = SEE_MASK_NOCLOSEPROCESS;
624 shell_execute_info.lpFile = file_path.c_str(); 627 shell_execute_info.lpFile = file_path.c_str();
628 shell_execute_info.lpDirectory = current_directory.c_str();
629 shell_execute_info.nShow = SW_SHOW;
625 630
626 if (!ShellExecuteEx(&shell_execute_info)) { 631 if (!ShellExecuteEx(&shell_execute_info)) {
627 DLOG(WARNING) << "Failed to launch plugin installer " 632 DLOG(WARNING) << "Failed to launch plugin installer "
628 << file_path.c_str() << " Error " 633 << file_path.c_str() << " Error "
629 << ::GetLastError(); 634 << ::GetLastError();
630 set_plugin_installer_state(PluginInstallerLaunchFailure); 635 set_plugin_installer_state(PluginInstallerLaunchFailure);
631 DisplayStatus(IDS_DEFAULT_PLUGIN_INSTALLATION_FAILED_MSG); 636 DisplayStatus(IDS_DEFAULT_PLUGIN_INSTALLATION_FAILED_MSG);
632 NOTREACHED(); 637 NOTREACHED();
633 } else { 638 } else {
634 DLOG(INFO) << "Successfully launched plugin installer"; 639 DLOG(INFO) << "Successfully launched plugin installer";
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 748 }
744 749
745 void PluginInstallerImpl::NotifyPluginStatus(int status) { 750 void PluginInstallerImpl::NotifyPluginStatus(int status) {
746 default_plugin::g_browser->getvalue( 751 default_plugin::g_browser->getvalue(
747 instance_, 752 instance_,
748 static_cast<NPNVariable>( 753 static_cast<NPNVariable>(
749 default_plugin::kMissingPluginStatusStart + status), 754 default_plugin::kMissingPluginStatusStart + status),
750 NULL); 755 NULL);
751 } 756 }
752 757
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698