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

Unified Diff: components/mus/public/cpp/window.h

Issue 1991973003: mash: Preliminary support for widget hit test masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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: components/mus/public/cpp/window.h
diff --git a/components/mus/public/cpp/window.h b/components/mus/public/cpp/window.h
index 883dec239621f3b11a989701b5707251ac6b1db5..d94d01a3bdb584b3ae197866c9d20e9b94850eb1 100644
--- a/components/mus/public/cpp/window.h
+++ b/components/mus/public/cpp/window.h
@@ -87,6 +87,12 @@ class Window {
void SetClientArea(const gfx::Insets& new_client_area,
const std::vector<gfx::Rect>& additional_client_areas);
+ // Mouse events outside the hit test mask do not hit the window. Returns null
+ // if there is no mask.
+ const gfx::Rect* hit_test_mask() const { return hit_test_mask_.get(); }
+ void SetHitTestMask(const gfx::Rect& mask_rect);
+ void ClearHitTestMask();
+
// Visibility (also see IsDrawn()). When created windows are hidden.
bool visible() const { return visible_; }
void SetVisible(bool value);
@@ -323,6 +329,7 @@ class Window {
gfx::Rect bounds_;
gfx::Insets client_area_;
std::vector<gfx::Rect> additional_client_areas_;
+ std::unique_ptr<gfx::Rect> hit_test_mask_;
mojom::ViewportMetricsPtr viewport_metrics_;
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698