| 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
|
|
|