summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-01 18:41:23 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-01 18:41:23 +0000
commit076700e676bfcbfe23d25d569a09cc7d4b8e127a (patch)
tree740c9d1438dfb77fafcd49675dd6252a89e431ad /chrome/common
parent03382f8aa1fc1730d7c0ffca748393c3cdd0356d (diff)
downloadchromium_src-076700e676bfcbfe23d25d569a09cc7d4b8e127a.zip
chromium_src-076700e676bfcbfe23d25d569a09cc7d4b8e127a.tar.gz
chromium_src-076700e676bfcbfe23d25d569a09cc7d4b8e127a.tar.bz2
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
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/platform_util.h5
-rw-r--r--chrome/common/platform_util_linux.cc6
-rw-r--r--chrome/common/platform_util_mac.mm5
-rw-r--r--chrome/common/platform_util_win.cc5
4 files changed, 21 insertions, 0 deletions
diff --git a/chrome/common/platform_util.h b/chrome/common/platform_util.h
index 27ef5c4..3886f17 100644
--- a/chrome/common/platform_util.h
+++ b/chrome/common/platform_util.h
@@ -5,6 +5,8 @@
#ifndef CHROME_COMMON_PLATFORM_UTIL_H_
#define CHROME_COMMON_PLATFORM_UTIL_H_
+#include "base/gfx/native_widget_types.h"
+
class FilePath;
namespace platform_util {
@@ -12,6 +14,9 @@ namespace platform_util {
// Show the given file in a file manager. If possible, select the file.
void ShowItemInFolder(const FilePath& full_path);
+// Get the top level window for the native view. This can return NULL.
+gfx::NativeWindow GetTopLevel(gfx::NativeView view);
+
}
#endif // CHROME_COMMON_PLATFORM_UTIL_H_
diff --git a/chrome/common/platform_util_linux.cc b/chrome/common/platform_util_linux.cc
index de06f04..3c0f5f6 100644
--- a/chrome/common/platform_util_linux.cc
+++ b/chrome/common/platform_util_linux.cc
@@ -4,6 +4,8 @@
#include "chrome/common/platform_util.h"
+#include <gtk/gtk.h>
+
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/process_util.h"
@@ -25,4 +27,8 @@ void ShowItemInFolder(const FilePath& full_path) {
base::LaunchApp(argv, no_files, false, NULL);
}
+gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
+ return GTK_WINDOW(gtk_widget_get_toplevel(view));
+}
+
} // namespace platform_util
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm
index ea8474d..3ee3a2f 100644
--- a/chrome/common/platform_util_mac.mm
+++ b/chrome/common/platform_util_mac.mm
@@ -13,4 +13,9 @@ void ShowItemInFolder(const FilePath& full_path) {
NOTIMPLEMENTED();
}
+gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
} // namespace platform_util
diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc
index 217d832..16ea8c0 100644
--- a/chrome/common/platform_util_win.cc
+++ b/chrome/common/platform_util_win.cc
@@ -13,6 +13,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/gfx/native_widget_types.h"
#include "base/logging.h"
#include "chrome/common/win_util.h"
@@ -80,4 +81,8 @@ void ShowItemInFolder(const FilePath& full_path) {
highlight, NULL);
}
+gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
+ return GetAncestor(view, GA_ROOT);
+}
+
} // namespace platform_util