summaryrefslogtreecommitdiffstats
path: root/chrome/common/win_util.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 22:10:20 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 22:10:20 +0000
commit39a248b002d0f41ad816754bb2833eea0aff9c61 (patch)
tree2b3c12b82e8ba1779f3b5cf0b6e1783bb357c8bb /chrome/common/win_util.h
parentfe60fbbb329988a1b4eab5fcc78faaad719cda1b (diff)
downloadchromium_src-39a248b002d0f41ad816754bb2833eea0aff9c61.zip
chromium_src-39a248b002d0f41ad816754bb2833eea0aff9c61.tar.gz
chromium_src-39a248b002d0f41ad816754bb2833eea0aff9c61.tar.bz2
Adds the ability for save dialogs to take a default extension.
BUG=4287 TEST=see bug Review URL: http://codereview.chromium.org/10621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/win_util.h')
-rw-r--r--chrome/common/win_util.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/common/win_util.h b/chrome/common/win_util.h
index 6688892..5b0fc58 100644
--- a/chrome/common/win_util.h
+++ b/chrome/common/win_util.h
@@ -125,6 +125,8 @@ bool OpenItemViaShellNoZoneCheck(const std::wstring& full_path,
// Returns 'true' on successful open, 'false' otherwise.
bool OpenItemWithExternalApp(const std::wstring& full_path);
+std::wstring GetFileFilterFromPath(const std::wstring& file_name);
+
// Prompt the user for location to save a file. 'suggested_name' is a full path
// that gives the dialog box a hint as to how to initialize itself.
// For example, a 'suggested_name' of:
@@ -149,9 +151,12 @@ bool SaveFileAs(HWND owner,
// The parameter |index| indicates the initial index of filter description
// and filter pattern for the dialog box. If |index| is zero or greater than
// the number of total filter types, the system uses the first filter in the
-// |filter| buffer. The parameter |final_name| returns the file name which
-// contains the drive designator, path, file name, and extension of the user
-// selected file name.
+// |filter| buffer. |index| is used to specify the initial selected extension,
+// and when done contains the extension the user chose. The parameter
+// |final_name| returns the file name which contains the drive designator,
+// path, file name, and extension of the user selected file name. |def_ext| is
+// the default extension to give to the file if the user did not enter an
+// extension.
bool SaveFileAsWithFilter(HWND owner,
const std::wstring& suggested_name,
const wchar_t* filter,