OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SHELL_H_ | 5 #ifndef UI_BASE_WIN_SHELL_H_ |
6 #define UI_BASE_WIN_SHELL_H_ | 6 #define UI_BASE_WIN_SHELL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "ui/ui_api.h" |
12 | 13 |
13 class FilePath; | 14 class FilePath; |
14 | 15 |
15 namespace ui { | 16 namespace ui { |
16 namespace win { | 17 namespace win { |
17 | 18 |
18 // Open or run a file via the Windows shell. In the event that there is no | 19 // Open or run a file via the Windows shell. In the event that there is no |
19 // default application registered for the file specified by 'full_path', | 20 // default application registered for the file specified by 'full_path', |
20 // ask the user, via the Windows "Open With" dialog. | 21 // ask the user, via the Windows "Open With" dialog. |
21 // Returns 'true' on successful open, 'false' otherwise. | 22 // Returns 'true' on successful open, 'false' otherwise. |
22 bool OpenItemViaShell(const FilePath& full_path); | 23 UI_API bool OpenItemViaShell(const FilePath& full_path); |
23 | 24 |
24 // The download manager now writes the alternate data stream with the | 25 // The download manager now writes the alternate data stream with the |
25 // zone on all downloads. This function is equivalent to OpenItemViaShell | 26 // zone on all downloads. This function is equivalent to OpenItemViaShell |
26 // without showing the zone warning dialog. | 27 // without showing the zone warning dialog. |
27 bool OpenItemViaShellNoZoneCheck(const FilePath& full_path); | 28 UI_API bool OpenItemViaShellNoZoneCheck(const FilePath& full_path); |
28 | 29 |
29 // Ask the user, via the Windows "Open With" dialog, for an application to use | 30 // Ask the user, via the Windows "Open With" dialog, for an application to use |
30 // to open the file specified by 'full_path'. | 31 // to open the file specified by 'full_path'. |
31 // Returns 'true' on successful open, 'false' otherwise. | 32 // Returns 'true' on successful open, 'false' otherwise. |
32 bool OpenItemWithExternalApp(const string16& full_path); | 33 bool OpenItemWithExternalApp(const string16& full_path); |
33 | 34 |
34 // Sets the application id given as the Application Model ID for the window | 35 // Sets the application id given as the Application Model ID for the window |
35 // specified. This method is used to insure that different web applications | 36 // specified. This method is used to insure that different web applications |
36 // do not group together on the Win7 task bar. | 37 // do not group together on the Win7 task bar. |
37 void SetAppIdForWindow(const string16& app_id, HWND hwnd); | 38 UI_API void SetAppIdForWindow(const string16& app_id, HWND hwnd); |
38 | 39 |
39 } // namespace win | 40 } // namespace win |
40 } // namespace ui | 41 } // namespace ui |
41 | 42 |
42 #endif // UI_BASE_WIN_SHELL_H_ | 43 #endif // UI_BASE_WIN_SHELL_H_ |
OLD | NEW |