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

Unified Diff: ui/views/widget/desktop_aura/x11_topmost_window_finder.h

Issue 264713007: Add unittests for X11TopmostWindowFinder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: ui/views/widget/desktop_aura/x11_topmost_window_finder.h
diff --git a/ui/views/widget/desktop_aura/x11_topmost_window_finder.h b/ui/views/widget/desktop_aura/x11_topmost_window_finder.h
index cf8498abe50f5a803a5613cb97f3cccda0348b25..9e7856598c69ff95b5e6f82239fd8bc4f7d51d77 100644
--- a/ui/views/widget/desktop_aura/x11_topmost_window_finder.h
+++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder.h
@@ -5,6 +5,7 @@
#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_TOPMOST_WINDOW_FINDER_H_
#define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_TOPMOST_WINDOW_FINDER_H_
+#include <map>
#include <set>
#include "ui/base/x/x11_util.h"
@@ -37,14 +38,13 @@ class VIEWS_EXPORT X11TopmostWindowFinder
// ui::EnumerateWindowsDelegate:
virtual bool ShouldStopIterating(XID xid) OVERRIDE;
- // Returns true if |window| does not not belong to |ignore|, is visible and
- // contains |screen_loc_|.
- bool ShouldStopIteratingAtLocalProcessWindow(aura::Window* window);
-
gfx::Point screen_loc_;
- std::set<aura::Window*> ignore_;
XID toplevel_;
+ // Cache of XID to whether the window contains |screen_loc_|. Used to avoid
+ // querying a window's properties multiple times.
+ std::map<XID, bool> cache_;
+
DISALLOW_COPY_AND_ASSIGN(X11TopmostWindowFinder);
};

Powered by Google App Engine
This is Rietveld 408576698