OLD | NEW |
---|---|
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 UI_BASE_WIN_OPEN_FILE_NAME_WIN_H_ | 5 #ifndef UI_BASE_WIN_OPEN_FILE_NAME_WIN_H_ |
6 #define UI_BASE_WIN_OPEN_FILE_NAME_WIN_H_ | 6 #define UI_BASE_WIN_OPEN_FILE_NAME_WIN_H_ |
7 | 7 |
8 #include <Windows.h> | 8 #include <Windows.h> |
9 #include <Commdlg.h> | 9 #include <Commdlg.h> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... | |
33 ~OpenFileName(); | 33 ~OpenFileName(); |
34 | 34 |
35 // Initializes |lpstrFilter| from the label/pattern pairs in |filters|. | 35 // Initializes |lpstrFilter| from the label/pattern pairs in |filters|. |
36 void SetFilters( | 36 void SetFilters( |
37 const std::vector<Tuple2<base::string16, base::string16> >& filters); | 37 const std::vector<Tuple2<base::string16, base::string16> >& filters); |
38 | 38 |
39 // Sets |lpstrInitialDir| and |lpstrFile|. | 39 // Sets |lpstrInitialDir| and |lpstrFile|. |
40 void SetInitialSelection(const base::FilePath& initial_directory, | 40 void SetInitialSelection(const base::FilePath& initial_directory, |
41 const base::FilePath& initial_filename); | 41 const base::FilePath& initial_filename); |
42 | 42 |
43 // The save as dialog on Windows XP remembers its last position, and if the | |
44 // screen resolution has changed it may be off screen. This method will check | |
45 // if we are running on XP and if so install a hook to reposition the dialog | |
46 // if necessary. | |
47 void MaybeInstallWindowPositionHookForSaveAsOnXP(); | |
sky
2014/08/19 17:02:51
Rather than hooking is there a way to force a part
erikwright (departed)
2014/08/19 17:09:15
Possibly. Again, this is just existing code moved
| |
48 | |
43 // Returns the single selected file, or an empty path if there are more or | 49 // Returns the single selected file, or an empty path if there are more or |
44 // less than one results. | 50 // less than one results. |
45 base::FilePath GetSingleResult(); | 51 base::FilePath GetSingleResult(); |
46 | 52 |
47 // Returns the selected file or files. | 53 // Returns the selected file or files. |
48 void GetResult(base::FilePath* directory, | 54 void GetResult(base::FilePath* directory, |
49 std::vector<base::FilePath>* filenames); | 55 std::vector<base::FilePath>* filenames); |
50 | 56 |
51 // Returns the OPENFILENAME structure. | 57 // Returns the OPENFILENAME structure. |
52 OPENFILENAME* GetOPENFILENAME() { return &openfilename_; } | 58 OPENFILENAME* GetOPENFILENAME() { return &openfilename_; } |
(...skipping 18 matching lines...) Expand all Loading... | |
71 wchar_t filename_buffer_[UNICODE_STRING_MAX_CHARS]; | 77 wchar_t filename_buffer_[UNICODE_STRING_MAX_CHARS]; |
72 base::string16 filter_buffer_; | 78 base::string16 filter_buffer_; |
73 | 79 |
74 DISALLOW_COPY_AND_ASSIGN(OpenFileName); | 80 DISALLOW_COPY_AND_ASSIGN(OpenFileName); |
75 }; | 81 }; |
76 | 82 |
77 } // namespace win | 83 } // namespace win |
78 } // namespace ui | 84 } // namespace ui |
79 | 85 |
80 #endif // UI_BASE_WIN_OPEN_FILE_NAME_WIN_H_ | 86 #endif // UI_BASE_WIN_OPEN_FILE_NAME_WIN_H_ |
OLD | NEW |