| 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 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // The download manager now writes the alternate data stream with the | 26 // The download manager now writes the alternate data stream with the |
| 27 // zone on all downloads. This function is equivalent to OpenItemViaShell | 27 // zone on all downloads. This function is equivalent to OpenItemViaShell |
| 28 // without showing the zone warning dialog. | 28 // without showing the zone warning dialog. |
| 29 UI_EXPORT bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path); | 29 UI_EXPORT bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path); |
| 30 | 30 |
| 31 // Lower level function that allows opening of non-files like urls or GUIDs | 31 // Lower level function that allows opening of non-files like urls or GUIDs |
| 32 // don't use it if one of the above will do. |mask| is a valid combination | 32 // don't use it if one of the above will do. |mask| is a valid combination |
| 33 // of SEE_MASK_FLAG_XXX as stated in msdn. If there is no default application | 33 // of SEE_MASK_FLAG_XXX as stated in msdn. If there is no default application |
| 34 // registered for the item, it behaves the same as OpenItemViaShell. | 34 // registered for the item, it behaves the same as OpenItemViaShell. |
| 35 UI_EXPORT bool OpenAnyViaShell(const string16& full_path, | 35 UI_EXPORT bool OpenAnyViaShell(const base::string16& full_path, |
| 36 const string16& directory, | 36 const base::string16& directory, |
| 37 const string16& args, | 37 const base::string16& args, |
| 38 DWORD mask); | 38 DWORD mask); |
| 39 | 39 |
| 40 // Ask the user, via the Windows "Open With" dialog, for an application to use | 40 // Ask the user, via the Windows "Open With" dialog, for an application to use |
| 41 // to open the file specified by 'full_path'. | 41 // to open the file specified by 'full_path'. |
| 42 // Returns 'true' on successful open, 'false' otherwise. | 42 // Returns 'true' on successful open, 'false' otherwise. |
| 43 bool OpenItemWithExternalApp(const string16& full_path); | 43 bool OpenItemWithExternalApp(const base::string16& full_path); |
| 44 | 44 |
| 45 // Disables the ability of the specified window to be pinned to the taskbar or | 45 // Disables the ability of the specified window to be pinned to the taskbar or |
| 46 // the Start menu. This will remove "Pin this program to taskbar" from the | 46 // the Start menu. This will remove "Pin this program to taskbar" from the |
| 47 // taskbar menu of the specified window. | 47 // taskbar menu of the specified window. |
| 48 UI_EXPORT bool PreventWindowFromPinning(HWND hwnd); | 48 UI_EXPORT bool PreventWindowFromPinning(HWND hwnd); |
| 49 | 49 |
| 50 // Sets the application id, app icon, relaunch command and relaunch display name | 50 // Sets the application id, app icon, relaunch command and relaunch display name |
| 51 // for the given window. | 51 // for the given window. |
| 52 UI_EXPORT void SetAppDetailsForWindow(const string16& app_id, | 52 UI_EXPORT void SetAppDetailsForWindow( |
| 53 const string16& app_icon, | 53 const base::string16& app_id, |
| 54 const string16& relaunch_command, | 54 const base::string16& app_icon, |
| 55 const string16& relaunch_display_name, | 55 const base::string16& relaunch_command, |
| 56 HWND hwnd); | 56 const base::string16& relaunch_display_name, |
| 57 HWND hwnd); |
| 57 | 58 |
| 58 // Sets the application id given as the Application Model ID for the window | 59 // Sets the application id given as the Application Model ID for the window |
| 59 // specified. This method is used to insure that different web applications | 60 // specified. This method is used to insure that different web applications |
| 60 // do not group together on the Win7 task bar. | 61 // do not group together on the Win7 task bar. |
| 61 UI_EXPORT void SetAppIdForWindow(const string16& app_id, HWND hwnd); | 62 UI_EXPORT void SetAppIdForWindow(const base::string16& app_id, HWND hwnd); |
| 62 | 63 |
| 63 // Sets the application icon for the window specified. | 64 // Sets the application icon for the window specified. |
| 64 UI_EXPORT void SetAppIconForWindow(const string16& app_icon, HWND hwnd); | 65 UI_EXPORT void SetAppIconForWindow(const base::string16& app_icon, HWND hwnd); |
| 65 | 66 |
| 66 // Sets the relaunch command and relaunch display name for the window specified. | 67 // Sets the relaunch command and relaunch display name for the window specified. |
| 67 // Windows will use this information for grouping on the taskbar, and to create | 68 // Windows will use this information for grouping on the taskbar, and to create |
| 68 // a shortcut if the window is pinned to the taskbar. | 69 // a shortcut if the window is pinned to the taskbar. |
| 69 UI_EXPORT void SetRelaunchDetailsForWindow(const string16& relaunch_command, | 70 UI_EXPORT void SetRelaunchDetailsForWindow( |
| 70 const string16& display_name, | 71 const base::string16& relaunch_command, |
| 71 HWND hwnd); | 72 const base::string16& display_name, |
| 73 HWND hwnd); |
| 72 | 74 |
| 73 // Returns true if composition is available and turned on on the current | 75 // Returns true if composition is available and turned on on the current |
| 74 // platform. | 76 // platform. |
| 75 UI_EXPORT bool IsAeroGlassEnabled(); | 77 UI_EXPORT bool IsAeroGlassEnabled(); |
| 76 | 78 |
| 77 } // namespace win | 79 } // namespace win |
| 78 } // namespace ui | 80 } // namespace ui |
| 79 | 81 |
| 80 #endif // UI_BASE_WIN_SHELL_H_ | 82 #endif // UI_BASE_WIN_SHELL_H_ |
| OLD | NEW |