| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_PLATFORM_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PLATFORM_UTIL_H_ |
| 6 #define CHROME_BROWSER_PLATFORM_UTIL_H_ | 6 #define CHROME_BROWSER_PLATFORM_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 bool IsWindowActive(gfx::NativeWindow window); | 36 bool IsWindowActive(gfx::NativeWindow window); |
| 37 | 37 |
| 38 // Activate the window, bringing it to the foreground top level. | 38 // Activate the window, bringing it to the foreground top level. |
| 39 void ActivateWindow(gfx::NativeWindow window); | 39 void ActivateWindow(gfx::NativeWindow window); |
| 40 | 40 |
| 41 // Returns true if the view is visible. The exact definition of this is | 41 // Returns true if the view is visible. The exact definition of this is |
| 42 // platform-specific, but it is generally not "visible to the user", rather | 42 // platform-specific, but it is generally not "visible to the user", rather |
| 43 // whether the view has the visible attribute set. | 43 // whether the view has the visible attribute set. |
| 44 bool IsVisible(gfx::NativeView view); | 44 bool IsVisible(gfx::NativeView view); |
| 45 | 45 |
| 46 // Pops up an error box with an OK button. If |parent| is non-null, the box | 46 } // platform_util |
| 47 // will be modal on it. (On Mac, it is always app-modal.) Generally speaking, | |
| 48 // this function should not be used for much. Infobars are preferred. | |
| 49 void SimpleErrorBox(gfx::NativeWindow parent, | |
| 50 const string16& title, | |
| 51 const string16& message); | |
| 52 | |
| 53 // Pops up a dialog box with two buttons (Yes/No), with the default button of | |
| 54 // Yes. If |parent| is non-null, the box will be modal on it. (On Mac, it is | |
| 55 // always app-modal.) Returns true if the Yes button was chosen. | |
| 56 bool SimpleYesNoBox(gfx::NativeWindow parent, | |
| 57 const string16& title, | |
| 58 const string16& message); | |
| 59 } | |
| 60 | 47 |
| 61 #endif // CHROME_BROWSER_PLATFORM_UTIL_H_ | 48 #endif // CHROME_BROWSER_PLATFORM_UTIL_H_ |
| OLD | NEW |