| 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 008dad5ac28280f3d0dc042c560fb17acba89724..52759524a2a85cd3590d308d6f1c554c10e66c4c 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 {
|
|
|
| @@ -24,4 +30,15 @@ bool IsPaletteEnabledOnEveryDisplay() {
|
| switches::kAshEnablePaletteOnAllDisplays);
|
| }
|
|
|
| +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
|
|
|