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

Side by Side Diff: base/x11/x11_error_tracker.h

Issue 24160005: Move ui/base/x/x11_error_tracker to base/x11. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 2 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 | « base/base.gypi ('k') | base/x11/x11_error_tracker.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 BASE_X11_X11_ERROR_TRACKER_H_
6 #define BASE_X11_X11_ERROR_TRACKER_H_
7
5 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
6 9
10 #include "base/base_export.h"
7 #include "base/basictypes.h" 11 #include "base/basictypes.h"
8 #include "ui/base/ui_export.h"
9 12
10 namespace ui { 13 namespace base {
11 14
12 // 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
13 // temporarily changing the X11 error handler. The old error handler is 16 // temporarily changing the X11 error handler. The old error handler is
14 // restored when the tracker is destroyed. 17 // restored when the tracker is destroyed.
15 class UI_EXPORT X11ErrorTracker { 18 class BASE_EXPORT X11ErrorTracker {
16 public: 19 public:
17 X11ErrorTracker(); 20 X11ErrorTracker();
18 ~X11ErrorTracker(); 21 ~X11ErrorTracker();
19 22
20 // 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
21 // (or since the creation of the tracker). This is potentially expensive, 24 // (or since the creation of the tracker). This is potentially expensive,
22 // since this causes a sync with the X server. 25 // since this causes a sync with the X server.
23 bool FoundNewError(); 26 bool FoundNewError();
24 27
25 private: 28 private:
26 #if !defined(TOOLKIT_GTK) 29 #if !defined(TOOLKIT_GTK)
27 XErrorHandler old_handler_; 30 XErrorHandler old_handler_;
28 #endif 31 #endif
29 32
30 DISALLOW_COPY_AND_ASSIGN(X11ErrorTracker); 33 DISALLOW_COPY_AND_ASSIGN(X11ErrorTracker);
31 }; 34 };
32 35
33 } // namespace ui 36 } // namespace base
37
38 #endif // BASE_X11_X11_ERROR_TRACKER_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/x11/x11_error_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698