Re-enable save package on linux, mac.
Review URL: http://codereview.chromium.org/56153
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12966 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index f58307c..f7f7864a 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -28,6 +28,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/platform_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/stl_util-inl.h"
@@ -636,14 +637,11 @@
#if defined(OS_WIN)
std::wstring filter =
win_util::GetFileFilterFromPath(info->suggested_path.value());
- gfx::NativeWindow owning_window =
- contents ? GetAncestor(contents->GetNativeView(), GA_ROOT) : NULL;
#elif defined(OS_LINUX)
std::wstring filter;
- gfx::NativeWindow owning_window = contents ?
- GTK_WINDOW(gtk_widget_get_toplevel(contents->GetNativeView())) :
- NULL;
#endif
+ gfx::NativeWindow owning_window =
+ contents ? platform_util::GetTopLevel(contents->GetNativeView()) : NULL;
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
std::wstring(),
info->suggested_path.ToWStringHack(),