Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / base / win / shell.h
blob3b64ce7dca289ef68b28e06b4dbbab271f330a98
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_
8 #include <windows.h>
10 #include "base/strings/string16.h"
11 #include "ui/base/ui_base_export.h"
13 namespace base {
14 class FilePath;
17 namespace ui {
18 namespace win {
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,
33 DWORD mask);
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,
47 HWND hwnd);
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,
56 HWND hwnd);
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,
64 HWND hwnd);
66 // Returns true if composition is available and turned on on the current
67 // platform.
68 UI_BASE_EXPORT bool IsAeroGlassEnabled();
70 } // namespace win
71 } // namespace ui
73 #endif // UI_BASE_WIN_SHELL_H_