diff options
author | dhg@chromium.org <dhg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 21:44:24 +0000 |
---|---|---|
committer | dhg@chromium.org <dhg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 21:44:24 +0000 |
commit | 14a000d1e7ced20cb4866a727323e4ea99f78bf7 (patch) | |
tree | bdee87d2b78ec19c5f64cb2121f61a5d46d12a0b /chrome/browser/platform_util.h | |
parent | 58e1d9a47237870c128fe00fbd2e94e96319ffed (diff) | |
download | chromium_src-14a000d1e7ced20cb4866a727323e4ea99f78bf7.zip chromium_src-14a000d1e7ced20cb4866a727323e4ea99f78bf7.tar.gz chromium_src-14a000d1e7ced20cb4866a727323e4ea99f78bf7.tar.bz2 |
Changing linux platform for chromeos. This involved moving platform_util and extension_error_reporter to browser, so that the UIs surrounding them can be in the browser.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1705009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/platform_util.h')
-rw-r--r-- | chrome/browser/platform_util.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/chrome/browser/platform_util.h b/chrome/browser/platform_util.h new file mode 100644 index 0000000..1f148f4 --- /dev/null +++ b/chrome/browser/platform_util.h @@ -0,0 +1,51 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_PLATFORM_UTIL_H_ +#define CHROME_BROWSER_PLATFORM_UTIL_H_ + +#include "base/string16.h" +#include "gfx/native_widget_types.h" + +class FilePath; +class GURL; + +namespace platform_util { + +// Show the given file in a file manager. If possible, select the file. +void ShowItemInFolder(const FilePath& full_path); + +// Open the given file in the desktop's default manner. +void OpenItem(const FilePath& full_path); + +// Open the given external protocol URL in the desktop's default manner. +// (For example, mailto: URLs in the default mail user agent.) +void OpenExternal(const GURL& url); + +// Get the top level window for the native view. This can return NULL. +gfx::NativeWindow GetTopLevel(gfx::NativeView view); + +// Returns true if |window| is the foreground top level window. +bool IsWindowActive(gfx::NativeWindow window); + +// Returns true if the view is visible. The exact definition of this is +// platform-specific, but it is generally not "visible to the user", rather +// whether the view has the visible attribute set. +bool IsVisible(gfx::NativeView view); + +// Pops up an error box with an OK button. If |parent| is non-null, the box +// will be modal on it. (On Mac, it is always app-modal.) Generally speaking, +// this class should not be used for much. Infobars are preferred. +void SimpleErrorBox(gfx::NativeWindow parent, + const string16& title, + const string16& message); + +// Return a human readable modifier for the version string. For a +// branded Chrome (not Chromium), this modifier is the channel (dev, +// beta, stable). +string16 GetVersionStringModifier(); + +} + +#endif // CHROME_BROWSER_PLATFORM_UTIL_H_ |