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
3 // found in the LICENSE file.
5 #ifndef UI_BASE_WIN_SHELL_H_
6 #define UI_BASE_WIN_SHELL_H_
10 #include "base/strings/string16.h"
11 #include "ui/base/ui_base_export.h"
20 // Open or run a file via the Windows shell. In the event that there is no
21 // default application registered for the file specified by 'full_path',
22 // ask the user, via the Windows "Open With" dialog.
23 // Returns 'true' on successful open, 'false' otherwise.
24 UI_BASE_EXPORT
bool OpenItemViaShell(const base::FilePath
& full_path
);
26 // Lower level function that allows opening of non-files like urls or GUIDs
27 // don't use it if one of the above will do. |mask| is a valid combination
28 // of SEE_MASK_FLAG_XXX as stated in msdn. If there is no default application
29 // registered for the item, it behaves the same as OpenItemViaShell.
30 UI_BASE_EXPORT
bool OpenAnyViaShell(const base::string16
& full_path
,
31 const base::string16
& directory
,
32 const base::string16
& args
,
35 // Disables the ability of the specified window to be pinned to the taskbar or
36 // the Start menu. This will remove "Pin this program to taskbar" from the
37 // taskbar menu of the specified window.
38 UI_BASE_EXPORT
bool PreventWindowFromPinning(HWND hwnd
);
40 // Sets the application id, app icon, relaunch command and relaunch display name
41 // for the given window.
42 UI_BASE_EXPORT
void SetAppDetailsForWindow(
43 const base::string16
& app_id
,
44 const base::string16
& app_icon
,
45 const base::string16
& relaunch_command
,
46 const base::string16
& relaunch_display_name
,
49 // Sets the application id given as the Application Model ID for the window
50 // specified. This method is used to insure that different web applications
51 // do not group together on the Win7 task bar.
52 UI_BASE_EXPORT
void SetAppIdForWindow(const base::string16
& app_id
, HWND hwnd
);
54 // Sets the application icon for the window specified.
55 UI_BASE_EXPORT
void SetAppIconForWindow(const base::string16
& app_icon
,
58 // Sets the relaunch command and relaunch display name for the window specified.
59 // Windows will use this information for grouping on the taskbar, and to create
60 // a shortcut if the window is pinned to the taskbar.
61 UI_BASE_EXPORT
void SetRelaunchDetailsForWindow(
62 const base::string16
& relaunch_command
,
63 const base::string16
& display_name
,
66 // Returns true if composition is available and turned on on the current
68 UI_BASE_EXPORT
bool IsAeroGlassEnabled();
73 #endif // UI_BASE_WIN_SHELL_H_