| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_PLATFORM_UTIL_H_ | |
| 6 #define CHROME_COMMON_PLATFORM_UTIL_H_ | |
| 7 | |
| 8 #include "base/string16.h" | |
| 9 #include "gfx/native_widget_types.h" | |
| 10 | |
| 11 class FilePath; | |
| 12 class GURL; | |
| 13 | |
| 14 namespace platform_util { | |
| 15 | |
| 16 // Show the given file in a file manager. If possible, select the file. | |
| 17 void ShowItemInFolder(const FilePath& full_path); | |
| 18 | |
| 19 // Open the given file in the desktop's default manner. | |
| 20 void OpenItem(const FilePath& full_path); | |
| 21 | |
| 22 // Open the given external protocol URL in the desktop's default manner. | |
| 23 // (For example, mailto: URLs in the default mail user agent.) | |
| 24 void OpenExternal(const GURL& url); | |
| 25 | |
| 26 // Get the top level window for the native view. This can return NULL. | |
| 27 gfx::NativeWindow GetTopLevel(gfx::NativeView view); | |
| 28 | |
| 29 // Returns true if |window| is the foreground top level window. | |
| 30 bool IsWindowActive(gfx::NativeWindow window); | |
| 31 | |
| 32 // Returns true if the view is visible. The exact definition of this is | |
| 33 // platform-specific, but it is generally not "visible to the user", rather | |
| 34 // whether the view has the visible attribute set. | |
| 35 bool IsVisible(gfx::NativeView view); | |
| 36 | |
| 37 // Pops up an error box with an OK button. If |parent| is non-null, the box | |
| 38 // will be modal on it. (On Mac, it is always app-modal.) Generally speaking, | |
| 39 // this class should not be used for much. Infobars are preferred. | |
| 40 void SimpleErrorBox(gfx::NativeWindow parent, | |
| 41 const string16& title, | |
| 42 const string16& message); | |
| 43 | |
| 44 // Return a human readable modifier for the version string. For a | |
| 45 // branded Chrome (not Chromium), this modifier is the channel (dev, | |
| 46 // beta, stable). | |
| 47 string16 GetVersionStringModifier(); | |
| 48 | |
| 49 } | |
| 50 | |
| 51 #endif // CHROME_COMMON_PLATFORM_UTIL_H_ | |
| OLD | NEW |