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

Unified Diff: ui/aura/test/test_window_delegate.cc

Issue 10566009: app_list: Fix shadow bleeds over launcher button and steals mouse events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura_demo compilation Created 8 years, 6 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
« no previous file with comments | « ui/aura/test/test_window_delegate.h ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/aura/test/test_window_delegate.h ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698