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. 4 5 #ifndef UI_BASE_X_X11_SCREENSAVER_WINDOW_FINDER_H_ 6 #define UI_BASE_X_X11_SCREENSAVER_WINDOW_FINDER_H_ 7 8 #include "base/component_export.h" 9 #include "base/macros.h" 10 #include "ui/base/x/x11_util.h" 11 12 namespace ui { 13 COMPONENT_EXPORT(UI_BASE_X)14class COMPONENT_EXPORT(UI_BASE_X) ScreensaverWindowFinder 15 : public ui::EnumerateWindowsDelegate { 16 public: 17 static bool ScreensaverWindowExists(); 18 19 protected: 20 bool ShouldStopIterating(x11::Window window) override; 21 22 private: 23 ScreensaverWindowFinder(); 24 25 bool IsScreensaverWindow(x11::Window window) const; 26 27 bool exists_; 28 29 DISALLOW_COPY_AND_ASSIGN(ScreensaverWindowFinder); 30 }; 31 32 } // namespace ui 33 34 #endif // UI_BASE_X_X11_SCREENSAVER_WINDOW_FINDER_H_ 35