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

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

Issue 16533: Convert download manager to FilePath. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « chrome/common/win_safe_util.cc ('k') | chrome/common/win_util.cc » ('j') | 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 #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>
12 12
13 #include "base/fix_wp64.h" 13 #include "base/fix_wp64.h"
14 #include "base/gfx/rect.h" 14 #include "base/gfx/rect.h"
15 #include "base/scoped_handle.h" 15 #include "base/scoped_handle.h"
16 #include "chrome/common/gfx/chrome_font.h" 16 #include "chrome/common/gfx/chrome_font.h"
17 17
18 class FilePath;
19
18 namespace win_util { 20 namespace win_util {
19 21
20 // Import ScopedHandle and friends into this namespace for backwards 22 // Import ScopedHandle and friends into this namespace for backwards
21 // compatibility. TODO(darin): clean this up! 23 // compatibility. TODO(darin): clean this up!
22 using ::ScopedHandle; 24 using ::ScopedHandle;
23 using ::ScopedFindFileHandle; 25 using ::ScopedFindFileHandle;
24 using ::ScopedHDC; 26 using ::ScopedHDC;
25 using ::ScopedBitmap; 27 using ::ScopedBitmap;
26 using ::ScopedHRGN; 28 using ::ScopedHRGN;
27 29
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 bool ShouldUseVistaFrame(); 107 bool ShouldUseVistaFrame();
106 108
107 // Open a Windows explorer window with the specified file highlighted. 109 // Open a Windows explorer window with the specified file highlighted.
108 void ShowItemInFolder(const std::wstring& full_path); 110 void ShowItemInFolder(const std::wstring& full_path);
109 111
110 // Open or run a file via the Windows shell. In the event that there is no 112 // Open or run a file via the Windows shell. In the event that there is no
111 // default application registered for the file specified by 'full_path', 113 // default application registered for the file specified by 'full_path',
112 // ask the user, via the Windows "Open With" dialog, for an application to use 114 // ask the user, via the Windows "Open With" dialog, for an application to use
113 // if 'ask_for_app' is true. 115 // if 'ask_for_app' is true.
114 // Returns 'true' on successful open, 'false' otherwise. 116 // Returns 'true' on successful open, 'false' otherwise.
115 bool OpenItemViaShell(const std::wstring& full_path, bool ask_for_app); 117 bool OpenItemViaShell(const FilePath& full_path, bool ask_for_app);
116 118
117 // The download manager now writes the alternate data stream with the 119 // The download manager now writes the alternate data stream with the
118 // zone on all downloads. This function is equivalent to OpenItemViaShell 120 // zone on all downloads. This function is equivalent to OpenItemViaShell
119 // without showing the zone warning dialog. 121 // without showing the zone warning dialog.
120 bool OpenItemViaShellNoZoneCheck(const std::wstring& full_path, 122 bool OpenItemViaShellNoZoneCheck(const FilePath& full_path,
121 bool ask_for_app); 123 bool ask_for_app);
122 124
123 // Ask the user, via the Windows "Open With" dialog, for an application to use 125 // Ask the user, via the Windows "Open With" dialog, for an application to use
124 // to open the file specified by 'full_path'. 126 // to open the file specified by 'full_path'.
125 // Returns 'true' on successful open, 'false' otherwise. 127 // Returns 'true' on successful open, 'false' otherwise.
126 bool OpenItemWithExternalApp(const std::wstring& full_path); 128 bool OpenItemWithExternalApp(const std::wstring& full_path);
127 129
128 std::wstring GetFileFilterFromPath(const std::wstring& file_name); 130 std::wstring GetFileFilterFromPath(const std::wstring& file_name);
129 131
130 // Returns a file filter whose description comes from the OS for the first file 132 // Returns a file filter whose description comes from the OS for the first file
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 const std::wstring& text, 256 const std::wstring& text,
255 const std::wstring& caption, 257 const std::wstring& caption,
256 UINT flags); 258 UINT flags);
257 259
258 // Returns the system set window title font. 260 // Returns the system set window title font.
259 ChromeFont GetWindowTitleFont(); 261 ChromeFont GetWindowTitleFont();
260 262
261 } // namespace win_util 263 } // namespace win_util
262 264
263 #endif // CHROME_COMMON_WIN_UTIL_H_ 265 #endif // CHROME_COMMON_WIN_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/common/win_safe_util.cc ('k') | chrome/common/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698