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

Unified Diff: ui/views/cocoa/bridged_content_view.h

Issue 1718043003: MacViews: Clip contents for non-rectangular windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: ui/views/cocoa/bridged_content_view.h
diff --git a/ui/views/cocoa/bridged_content_view.h b/ui/views/cocoa/bridged_content_view.h
index f4b6a867cd7c56da72d142f05aa21551bf6a6cc8..447696438a317ddde67e83e8a74f6bbf4a3c444f 100644
--- a/ui/views/cocoa/bridged_content_view.h
+++ b/ui/views/cocoa/bridged_content_view.h
@@ -48,7 +48,9 @@ class View;
// Whether dragging on the view moves the window.
BOOL mouseDownCanMoveWindow_;
- // The cached window mask. Only used for non-rectangular windows on 10.9.
+ // The cached window mask. Only used for non-rectangular windows. Used to clip
+ // window boundary and generate drop shadow on OSX 10.9 and for clipping view
+ // contents in BridgedNativeWidget.
base::scoped_nsobject<NSBezierPath> windowMask_;
}
@@ -76,8 +78,12 @@ class View;
// contentRect (also this NSView's frame), as given by a ui::LocatedEvent.
- (void)updateTooltipIfRequiredAt:(const gfx::Point&)locationInContent;
-// Update windowMask_ depending on the current view bounds.
-- (void)updateWindowMask;
+// Called by the BridgedNativeWidget, when the window and hence the view bounds
+// change.
+- (void)onSizeChanged;
tapted 2016/02/24 05:05:03 perhaps just expose updateWindowMask?
karandeepb 2016/02/25 03:31:06 Done. Wasn't it better encapsulation though, since
tapted 2016/02/25 08:07:21 I think what I didn't like was that an NSView shou
+
+// Returns |windowMask_|.
+- (NSBezierPath*)windowMask;
tapted 2016/02/24 05:05:03 @property(readonly, nonatomic) NSBezierPath* windo
karandeepb 2016/02/25 03:31:06 Done.
@end

Powered by Google App Engine
This is Rietveld 408576698