Index: ui/aura/test/test_window_delegate.cc |
diff --git a/ui/aura/test/test_window_delegate.cc b/ui/aura/test/test_window_delegate.cc |
index 52b50d7788f12a8bd4f2befa6b6d4d66ed2c67b7..54a342e7fef15c955568e1b0fe788bfe918c3342 100644 |
--- a/ui/aura/test/test_window_delegate.cc |
+++ b/ui/aura/test/test_window_delegate.cc |
@@ -8,6 +8,8 @@ |
#include "ui/aura/window.h" |
#include "ui/base/hit_test.h" |
#include "ui/gfx/canvas.h" |
+#include "ui/gfx/path.h" |
+#include "ui/gfx/skia_util.h" |
namespace aura { |
namespace test { |
@@ -82,6 +84,12 @@ void TestWindowDelegate::OnWindowDestroyed() { |
void TestWindowDelegate::OnWindowVisibilityChanged(bool visible) { |
} |
+bool TestWindowDelegate::HasHitTestMask() const { |
+ return false; |
+} |
+ |
+void TestWindowDelegate::GetHitTestMask(gfx::Path* mask) const { |
+} |
//////////////////////////////////////////////////////////////////////////////// |
// ColorTestWindowDelegate |
@@ -104,5 +112,20 @@ void ColorTestWindowDelegate::OnPaint(gfx::Canvas* canvas) { |
canvas->DrawColor(color_, SkXfermode::kSrc_Mode); |
} |
+//////////////////////////////////////////////////////////////////////////////// |
+// MaskedWindowDelegate |
+ |
+MaskedWindowDelegate::MaskedWindowDelegate(const gfx::Rect mask_rect) |
+ : mask_rect_(mask_rect) { |
+} |
+ |
+bool MaskedWindowDelegate::HasHitTestMask() const { |
+ return true; |
+} |
+ |
+void MaskedWindowDelegate::GetHitTestMask(gfx::Path* mask) const { |
+ mask->addRect(RectToSkRect(mask_rect_)); |
+} |
+ |
} // namespace test |
} // namespace aura |