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

Unified Diff: ash/common/system/chromeos/palette/palette_utils.cc

Issue 2303963002: cros/ash: If the partial magnifier is active, do not consume input events if over palette views. (Closed)
Patch Set: Address comments Created 4 years, 3 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: ash/common/system/chromeos/palette/palette_utils.cc
diff --git a/ash/common/system/chromeos/palette/palette_utils.cc b/ash/common/system/chromeos/palette/palette_utils.cc
index 6a76068e90e36ebb1cf76aeeedba22767956d69a..5e26e25355a7701be143a1602d34b12b6b69c2a7 100644
--- a/ash/common/system/chromeos/palette/palette_utils.cc
+++ b/ash/common/system/chromeos/palette/palette_utils.cc
@@ -5,7 +5,13 @@
#include "ash/common/system/chromeos/palette/palette_utils.h"
#include "ash/common/ash_switches.h"
+#include "ash/common/shelf/wm_shelf.h"
+#include "ash/common/system/chromeos/palette/palette_tray.h"
+#include "ash/common/system/status_area_widget.h"
+#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "base/command_line.h"
+#include "ui/gfx/geometry/point.h"
namespace ash {
@@ -19,4 +25,15 @@ bool ArePaletteExperimentalFeaturesEnabled() {
switches::kAshEnableExperimentalPaletteFeatures);
}
+bool PaletteContainsPointInScreen(const gfx::Point& point) {
+ for (WmWindow* window : WmShell::Get()->GetAllRootWindows()) {
+ PaletteTray* palette_tray =
+ WmShelf::ForWindow(window)->GetStatusAreaWidget()->palette_tray();
+ if (palette_tray && palette_tray->ContainsPointInScreen(point))
+ return true;
+ }
+
+ return false;
+}
+
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698