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