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

Side by Side Diff: ui/gfx/x/x11_error_tracker.h

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/x/x11_atom_cache.h ('k') | ui/gfx/x/x11_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_GFX_X_X11_ERROR_TRACKER_H_ 5 #ifndef UI_GFX_X_X11_ERROR_TRACKER_H_
6 #define UI_GFX_X_X11_ERROR_TRACKER_H_ 6 #define UI_GFX_X_X11_ERROR_TRACKER_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/macros.h"
11 #include "ui/gfx/gfx_export.h" 11 #include "ui/gfx/gfx_export.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 14
15 // X11ErrorTracker catches X11 errors in a non-fatal way. It does so by 15 // X11ErrorTracker catches X11 errors in a non-fatal way. It does so by
16 // temporarily changing the X11 error handler. The old error handler is 16 // temporarily changing the X11 error handler. The old error handler is
17 // restored when the tracker is destroyed. 17 // restored when the tracker is destroyed.
18 class GFX_EXPORT X11ErrorTracker { 18 class GFX_EXPORT X11ErrorTracker {
19 public: 19 public:
20 X11ErrorTracker(); 20 X11ErrorTracker();
21 ~X11ErrorTracker(); 21 ~X11ErrorTracker();
22 22
23 // Returns whether an X11 error happened since this function was last called 23 // Returns whether an X11 error happened since this function was last called
24 // (or since the creation of the tracker). This is potentially expensive, 24 // (or since the creation of the tracker). This is potentially expensive,
25 // since this causes a sync with the X server. 25 // since this causes a sync with the X server.
26 bool FoundNewError(); 26 bool FoundNewError();
27 27
28 private: 28 private:
29 XErrorHandler old_handler_; 29 XErrorHandler old_handler_;
30 30
31 DISALLOW_COPY_AND_ASSIGN(X11ErrorTracker); 31 DISALLOW_COPY_AND_ASSIGN(X11ErrorTracker);
32 }; 32 };
33 33
34 } // namespace gfx 34 } // namespace gfx
35 35
36 #endif // UI_GFX_X_X11_ERROR_TRACKER_H_ 36 #endif // UI_GFX_X_X11_ERROR_TRACKER_H_
OLDNEW
« no previous file with comments | « ui/gfx/x/x11_atom_cache.h ('k') | ui/gfx/x/x11_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698