Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2097)

Unified Diff: app/x11_util_internal.h

Issue 3364019: Allow overriding of X error functions (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: app/x11_util_internal.h
diff --git a/app/x11_util_internal.h b/app/x11_util_internal.h
index 9b65dcd099766bfb053adf81b76d04614d438c74..ea3bd3daf67d470eb7fbaf32b73e526a423d80f8 100644
--- a/app/x11_util_internal.h
+++ b/app/x11_util_internal.h
@@ -20,9 +20,9 @@ extern "C" {
}
namespace x11_util {
- // NOTE: these function caches the results and must be called from the UI
+ // --------------------------------------------------------------------------
+ // NOTE: these functions cache the results and must be called from the UI
// thread.
-
// Get the XRENDER format id for ARGB32 (Skia's format).
//
// NOTE:Currently this don't support multiple screens/displays.
@@ -31,6 +31,16 @@ namespace x11_util {
// Get the XRENDER format id for the default visual on the first screen. This
// is the format which our GTK window will have.
XRenderPictFormat* GetRenderVisualFormat(Display* dpy, Visual* visual);
+
+ // --------------------------------------------------------------------------
+ // X11 error handling.
+ // Sets the X Error Handlers. Passing NULL for either will enable the default
+ // error handler, which if called will log the error and abort the process.
+ void SetX11ErrorHandlers(XErrorHandler error_handler,
+ XIOErrorHandler io_error_handler);
+
+ // Returns a string suitable for logging the error event.
+ std::string GetErrorEventDescription(XErrorEvent* error_event);
};
#endif // APP_X11_UTIL_INTERNAL_H_

Powered by Google App Engine
This is Rietveld 408576698