blob: dd3f75d0588c9a764f73af5012ba740dbeadd402 [file] [log] [blame]
[email protected]dcd57762011-06-25 12:18:511// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]1bbb1072011-06-25 01:59:212// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]dcd57762011-06-25 12:18:515#ifndef UI_BASE_WIN_SHELL_H_
6#define UI_BASE_WIN_SHELL_H_
[email protected]1bbb1072011-06-25 01:59:217
8#include <windows.h>
9
10#include "base/string16.h"
[email protected]507bad52011-08-06 04:51:0711#include "ui/base/ui_export.h"
[email protected]1bbb1072011-06-25 01:59:2112
13class FilePath;
14
[email protected]dcd57762011-06-25 12:18:5115namespace ui {
[email protected]1bbb1072011-06-25 01:59:2116namespace win {
[email protected]1bbb1072011-06-25 01:59:2117// Open or run a file via the Windows shell. In the event that there is no
18// default application registered for the file specified by 'full_path',
19// ask the user, via the Windows "Open With" dialog.
20// Returns 'true' on successful open, 'false' otherwise.
[email protected]507bad52011-08-06 04:51:0721UI_EXPORT bool OpenItemViaShell(const FilePath& full_path);
[email protected]1bbb1072011-06-25 01:59:2122
23// The download manager now writes the alternate data stream with the
24// zone on all downloads. This function is equivalent to OpenItemViaShell
25// without showing the zone warning dialog.
[email protected]507bad52011-08-06 04:51:0726UI_EXPORT bool OpenItemViaShellNoZoneCheck(const FilePath& full_path);
[email protected]1bbb1072011-06-25 01:59:2127
[email protected]3a1aaa92012-07-09 21:32:5428// Lower level function that allows opening of non-files like urls or GUIDs
29// don't use it if one of the above will do. |mask| is a valid combination
30// of SEE_MASK_FLAG_XXX as stated in msdn. If there is no default application
31// registered for the item, it behaves the same as OpenItemViaShell.
32UI_EXPORT bool OpenAnyViaShell(const string16& full_path,
33 const string16& directory,
34 DWORD mask);
35
[email protected]1bbb1072011-06-25 01:59:2136// Ask the user, via the Windows "Open With" dialog, for an application to use
37// to open the file specified by 'full_path'.
38// Returns 'true' on successful open, 'false' otherwise.
39bool OpenItemWithExternalApp(const string16& full_path);
40
41// Sets the application id given as the Application Model ID for the window
42// specified. This method is used to insure that different web applications
43// do not group together on the Win7 task bar.
[email protected]507bad52011-08-06 04:51:0744UI_EXPORT void SetAppIdForWindow(const string16& app_id, HWND hwnd);
[email protected]1bbb1072011-06-25 01:59:2145
[email protected]2de2d622011-10-21 22:07:3746// Sets the application icon for the window specified.
47UI_EXPORT void SetAppIconForWindow(const string16& app_icon, HWND hwnd);
48
[email protected]19c9f902012-08-22 16:24:4049// Returns true if composition is available and turned on on the current
50// platform.
51UI_EXPORT bool IsAeroGlassEnabled();
52
[email protected]1bbb1072011-06-25 01:59:2153} // namespace win
[email protected]dcd57762011-06-25 12:18:5154} // namespace ui
[email protected]1bbb1072011-06-25 01:59:2155
[email protected]dcd57762011-06-25 12:18:5156#endif // UI_BASE_WIN_SHELL_H_