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