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

Side by Side Diff: chrome/common/win_util.h

Issue 79045: Fixes saving files that don't have valid extensions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
scherkus (not reviewing) 2009/04/17 19:36:41 bump copyright year
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 #ifndef CHROME_COMMON_WIN_UTIL_H_ 5 #ifndef CHROME_COMMON_WIN_UTIL_H_
6 #define CHROME_COMMON_WIN_UTIL_H_ 6 #define CHROME_COMMON_WIN_UTIL_H_
7 7
8 #include <objbase.h> 8 #include <objbase.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // 'All Files' view. The purpose of the filter is to show only files of a 139 // 'All Files' view. The purpose of the filter is to show only files of a
140 // particular type in a Windows Save/Open dialog box. The resulting filter is 140 // particular type in a Windows Save/Open dialog box. The resulting filter is
141 // returned. The filters created here are: 141 // returned. The filters created here are:
142 // 1. only files that have 'file_ext' as their extension 142 // 1. only files that have 'file_ext' as their extension
143 // 2. all files (only added if 'include_all_files' is true) 143 // 2. all files (only added if 'include_all_files' is true)
144 // Example: 144 // Example:
145 // file_ext: { ".txt", ".htm;.html" } 145 // file_ext: { ".txt", ".htm;.html" }
146 // ext_desc: { "Text Document" } 146 // ext_desc: { "Text Document" }
147 // returned: "Text Document\0*.txt\0HTML Document\0.htm;.html\0" 147 // returned: "Text Document\0*.txt\0HTML Document\0.htm;.html\0"
148 // "All Files\0*.*\0\0" (in one big string) 148 // "All Files\0*.*\0\0" (in one big string)
149 // If a description is not provided for a file extension, it will be retrieved
150 // from the registry. If the file extension does not exist in the registry, it
151 // will be omitted from the filter, as it is likely a bogus extension.
149 std::wstring FormatFilterForExtensions( 152 std::wstring FormatFilterForExtensions(
150 const std::vector<std::wstring>& file_ext, 153 const std::vector<std::wstring>& file_ext,
151 const std::vector<std::wstring>& ext_desc, 154 const std::vector<std::wstring>& ext_desc,
152 bool include_all_files); 155 bool include_all_files);
153 156
154 // Prompt the user for location to save a file. 'suggested_name' is a full path 157 // Prompt the user for location to save a file. 'suggested_name' is a full path
155 // that gives the dialog box a hint as to how to initialize itself. 158 // that gives the dialog box a hint as to how to initialize itself.
156 // For example, a 'suggested_name' of: 159 // For example, a 'suggested_name' of:
157 // "C:\Documents and Settings\jojo\My Documents\picture.png" 160 // "C:\Documents and Settings\jojo\My Documents\picture.png"
158 // will start the dialog in the "C:\Documents and Settings\jojo\My Documents\" 161 // will start the dialog in the "C:\Documents and Settings\jojo\My Documents\"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 286
284 // Returns the system set window title font. 287 // Returns the system set window title font.
285 ChromeFont GetWindowTitleFont(); 288 ChromeFont GetWindowTitleFont();
286 289
287 // The thickness of an auto-hide taskbar in pixels. 290 // The thickness of an auto-hide taskbar in pixels.
288 extern const int kAutoHideTaskbarThicknessPx; 291 extern const int kAutoHideTaskbarThicknessPx;
289 292
290 } // namespace win_util 293 } // namespace win_util
291 294
292 #endif // CHROME_COMMON_WIN_UTIL_H_ 295 #endif // CHROME_COMMON_WIN_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698