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