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

Unified Diff: chrome/browser/screensaver_window_finder_x11.cc

Issue 15926004: linux_aura: Reuse non-GTK specific screensaver detection code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put exclusion in right gyp file. Created 7 years, 7 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
« no previous file with comments | « chrome/browser/screensaver_window_finder_x11.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/screensaver_window_finder_x11.cc
diff --git a/chrome/browser/screensaver_window_finder_gtk.cc b/chrome/browser/screensaver_window_finder_x11.cc
similarity index 86%
rename from chrome/browser/screensaver_window_finder_gtk.cc
rename to chrome/browser/screensaver_window_finder_x11.cc
index 4707514390aee066f0e615cb7f5a8c8d08f86250..f78079f5693527e45de66c7b9dbf2093442bb0de 100644
--- a/chrome/browser/screensaver_window_finder_gtk.cc
+++ b/chrome/browser/screensaver_window_finder_x11.cc
@@ -2,24 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/screensaver_window_finder_gtk.h"
+#include "chrome/browser/screensaver_window_finder_x11.h"
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
+#endif
#include "base/basictypes.h"
#include "ui/base/x/x11_util.h"
-
ScreensaverWindowFinder::ScreensaverWindowFinder()
: exists_(false) {
}
bool ScreensaverWindowFinder::ScreensaverWindowExists() {
+#if defined(TOOLKIT_GTK)
gdk_error_trap_push();
+#endif
ScreensaverWindowFinder finder;
ui::EnumerateTopLevelWindows(&finder);
- bool got_error = gdk_error_trap_pop();
+ bool got_error = false;
+#if defined(TOOLKIT_GTK)
+ got_error = gdk_error_trap_pop();
+#endif
return finder.exists_ && !got_error;
}
« no previous file with comments | « chrome/browser/screensaver_window_finder_x11.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698