OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_PLATFORM_UTIL_H_ | 5 #ifndef CHROME_COMMON_PLATFORM_UTIL_H_ |
6 #define CHROME_COMMON_PLATFORM_UTIL_H_ | 6 #define CHROME_COMMON_PLATFORM_UTIL_H_ |
7 | 7 |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 | 10 |
11 class FilePath; | 11 class FilePath; |
12 | 12 |
13 namespace platform_util { | 13 namespace platform_util { |
14 | 14 |
15 // Show the given file in a file manager. If possible, select the file. | 15 // Show the given file in a file manager. If possible, select the file. |
16 void ShowItemInFolder(const FilePath& full_path); | 16 void ShowItemInFolder(const FilePath& full_path); |
17 | 17 |
| 18 // Open the given file in the desktop's default manner. |
| 19 void OpenItem(const FilePath& full_path); |
| 20 |
18 // Get the top level window for the native view. This can return NULL. | 21 // Get the top level window for the native view. This can return NULL. |
19 gfx::NativeWindow GetTopLevel(gfx::NativeView view); | 22 gfx::NativeWindow GetTopLevel(gfx::NativeView view); |
20 | 23 |
21 // Get the title of the window. | 24 // Get the title of the window. |
22 string16 GetWindowTitle(gfx::NativeWindow window); | 25 string16 GetWindowTitle(gfx::NativeWindow window); |
23 | 26 |
24 // Returns true if |window| is the foreground top level window. | 27 // Returns true if |window| is the foreground top level window. |
25 bool IsWindowActive(gfx::NativeWindow window); | 28 bool IsWindowActive(gfx::NativeWindow window); |
26 | 29 |
27 // Returns true if the view is visible. The exact definition of this is | 30 // Returns true if the view is visible. The exact definition of this is |
28 // platform-specific, but it is generally not "visible to the user", rather | 31 // platform-specific, but it is generally not "visible to the user", rather |
29 // whether the view has the visible attribute set. | 32 // whether the view has the visible attribute set. |
30 bool IsVisible(gfx::NativeView view); | 33 bool IsVisible(gfx::NativeView view); |
31 | 34 |
32 } | 35 } |
33 | 36 |
34 #endif // CHROME_COMMON_PLATFORM_UTIL_H_ | 37 #endif // CHROME_COMMON_PLATFORM_UTIL_H_ |
OLD | NEW |