Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / base / idle / screensaver_window_finder_x11.h
blob1383b597d999c5a747a332a3488b9bf88a226fb0
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
3 // found in the LICENSE file.
5 #ifndef UI_BASE_IDLE_SCREENSAVER_WINDOW_FINDER_X11_H_
6 #define UI_BASE_IDLE_SCREENSAVER_WINDOW_FINDER_X11_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/base/x/x11_util.h"
12 namespace ui {
14 class ScreensaverWindowFinder : public ui::EnumerateWindowsDelegate {
15 public:
16 static bool ScreensaverWindowExists();
18 protected:
19 bool ShouldStopIterating(XID window) override;
21 private:
22 ScreensaverWindowFinder();
24 bool IsScreensaverWindow(XID window) const;
26 bool exists_;
28 DISALLOW_COPY_AND_ASSIGN(ScreensaverWindowFinder);
31 } // namespace ui
33 #endif // UI_BASE_IDLE_SCREENSAVER_WINDOW_FINDER_X11_H_